session checking improved