Token endpoint implementation