Fix authorization code flow.
Fix bug with error message.