"You need to sign in or sign up before continuing"

I can imagine the login/registration process using that. But how does the “you need to sign in” message know to pop up when it does? I was reading the topic and after a while it just appeared.