Tweaked error handling on the authorization module.