finishing login/logout