Refactored SessionController