Also fixes a few exception handler issues causing incorrect HTTP status codes on authorization errors.