add sign_in and sign_out function