include helper functions in sessions controller, update tests