Adding logout functionality