Using a less stupid way to check for session expiration
Clean