had to shift session checking to checking the DB