Added working login

Login now works with email and password.
added restore_token to the user table. this is used later for the
remember me option in the login system.