Global error handling for 401.

Issue #37