refactor base64 decode to match php client (always do it in parse_ticket, after checking for quote marks)