fixed error in logout