made the create_user_json loop only run if email is defined