Logging out automatically if a call to the backend fails