checking old_password when setting the user's email
fixing unit tests