correctly logout