fixing logout bug caused by accessing session from another application