Finishing login/logout