add password hash method according the ticket

Provide the login and logout endpoints.
Use the user model and check the password.