Adding session checking