Merge pull request #823 from narfbg/develop-session

Improve the Session library