When a 401 unauthorized occurs, expire the session and retry.

- This is the bare minimum change to get this issue working.
- We need extra checking to ensure that it's not because of
  authentication failure.