fixed up the session routes, added some more unit tests