Added unit testing and tests for new sessions service