Revert "User sessions partially working"

This reverts commit c170d6a7bba091bbf89a8887f416608af617ac2b.
Revert "Revert "User sessions partially working""

This reverts commit f00690304e5bd345ed7a4f6cda49fd9b797c5e4f.
User sessions fully working