add logout functionality