all the session checking