When the device tries to connect to an access point or router, it has to sign in on the captive portal page with the message saying
"Sign in to Wi-Fi network".
How does the access point/router identify that a sign in is required for the device and what is the process behind it?