refactor sessions controller module