fix logout process