Raise Unauthorized error for 401 and Dont raise error for 422

Raises Unauthorized error when HTTP 401 is received.
Don't raise error for 422. 422 can be easily handled by the parent application.