added error handling to the front end, added second password field to backedn