complete the sign-in and sign-out process