Register  works with incoding the password and storing it in database,
login works with encoded passwors comparing user input with passward
stored in database. There is no code yet that checks if login doesnt
exist,so throws an error