Create a Terms and Conditions pop-up on login

Does anyone know how I can make my terms and conditions popup when the user log ins to the page? I have the T&C window scripted in a an html file named terms.html. The user logs in from the index.html (this site uses SSO with Azure AD so it’s a one click log in) and once they’re authenticated, I want the terms.html page to load first, and then once they click Accept, then they get redirected to home.html. But I don’t want them to see the terms.html every time they log in, they only see it on the first log in.

I can’t change the sign in button href to the terms.html since that href points to the AAD SSO