Updated session check
Merge pull request #264 from Lerogero/master

Updated session check