Fixes errors when token endpoint fails

Checking for parameters existence stops the server from ending when the token endpoint fails.

Not try to parse the token if the token endpoint response was OK.