cleanup login/logout functionality