Refacto service and controller for the session.