AS-staging error. JSON parse error.

- If client sends an invalid authentication request then return the invalid response instead to crash.
Nice, in fact i believe that we could do it better. what about next:

statusCode >= 500  returns (statusCode, 'INTERNAL SERVER ERROR');
else
statusCode >= 400returns (statusCode, 'BAD REQUEST');