Switch order of update profile and logout