Trying to fix error with session not passing to different functions within the controller.