Added session expiration check