fix bug in logout

fix bug in logout