oauth2server: handle authorize errors

* Properly handle errors happening during authorize requests.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>