Added some session functionality