Fixed a bug where the session was not successfully cleared when it expired causing an infinite reload