return appropriate error codes if the email does not exist and if the email already exists.
Issue #63