adding logout method