Fixed bug with session expiration