issue #687 , some fixes if the user's email is already in use