Add 401 error handler.

Ticket: [BLD-1036](https://edx-wiki.atlassian.net/browse/BLD-1036)

@cpennington @auraz please review.
> Also, maybe just use " for the outer quotes, so that you don't need to escape the inner quote?

Fixed.