completed tests for sessions controller
code changes reflecting tweaks based on solution videos and refactoring to DRY up the code