Refactors Sessions controller