updated session checking