fix logout method