Added error messages for wrong password or duplicate email addresses