The way to do this automatically is to construct an HTTP request that mimics the tick-box-submit one, and run a script that periodically checks for connectivity and submits that request to the gateway once it times out.
As pdw8 says, you should be cautious using any public wifi network. Anyone connected to it can sniff all your unencrypted traffic, and partially identify encrypted traffic. On top of that your clients are more vulnerable to attacks from within the network than they would be behind NAT.