Added registration mail
Moved session stuff to its own class