if api fails with 404 ajaxify to 404, added type check to updateProfile