After some digging, I have to decide that what you are trying to achieve is not possible since there is no way to check whether there are additional login requirements necessary for the connected Wi-Fi networks.
You may be able to check the connectivity of the Wi-Fi network with the methods mentioned by both geffchanggeffchang and NoBugsNoBugs. But, since the connections with additional authentications literally give you the internet access to login to their network, the said apps and methods (even the tasker) will sadly be of lesser use.
But the Network Tester app suggested by NoBugssuggested by NoBugs seems promising even though it cannot switch the connections.
You can use an app like Auto WiFi / 3G Switch to do the switching automatically. This app can be used to disable Mobile Data / 3G connection automatically when your device is connected to a WiFi network and re-enable Mobile Data when your device is disconnected from WiFi network. Again of course, the app cannot detect whether or not there are additional authentications.
Finally you are left with manually switching and toggling your mobile data and Wi-Fi. You can use an app like 3G WiFi Connection Mode.