Append varible to url or set session

As Ambitious Amoeba said, just do the check on each page load; it shouldn’t be that expensive.

Otherwise, another possibility to store a single bit of information would be to use browser cookies.