Throw exceptions when session has been invalidated
Merge pull request #1271 from wolfie/master

Throw exceptions when session has been invalidated