Manage registration and login. Need to improve the login procedure