Avoid race conditions whit captiveportal when restarting firewall

The drawback of this is that the captie protal user could not navigate until the captiveprotal restarts