Fixes authentication flow

* On invalid grant will inform UI of unauthorized application request
* Bad username / password combination will return to login screen

Has one known issue: if login failed on login of application A and then
the user tries to login on application B, the redirect will be to
application A