Fix users array in sessions
Refactor in better separated modules