Revise session logic, move to top of controller