Refactoring sessions controller