fixed a bug with get_token, and token authentication