add sign-in-out function