adding logout functionality