Refactored create method in session controller.