Fixed token request in the client.
Fixed ApiController.