Ticketing and access control system