make sure the session id is valid