lock before read
Fix session lock
Merge pull request #1 from cvasseur/fix-session-handler

Fix session handler