added log out functionality