Refactoring sessino controller.