sign in, password reset, password change

Implented sessions management and password reset.
Do not hardcode `0`