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.
Incorrect Error Check
Merge pull request #1 from abalmos/patch-1

Fixes errors when token endpoint fails