Fix to stop email being updated to an empty string or null

There was a flaw in that if the users email address was updated to an
empty string or null it would prevent the user from being able to log in
(since emails are used to find the user during login).