Logout user on 401 to correctly handle session expiration.
Merge pull request #68 from hbj/feature/fix-session-expiration

Logout user on 401 to correctly handle session expiration.