Any way to get Wi-Fi to auto-connect only to hotspots that don't require a captive portal sign-in? Often, as I'm walking and using the internet, I'll walk by a Starbucks and my phone will auto-connect to attwifi (which is free, but requires that I open my browser and confirm).  I lose internet access for a little while, for no good reason.

I could turn off auto-connecting to known Wi-Fi networks, but then I'm getting rid of a useful, bandwidth-saving feature.

Any ideas for ways to get the best of both worlds, auto-connecting only to Wi-Fi networks that don't require a captive portal to sign in?
I think updating to lollipop will do the trick. As lollipop continues using your mobile data connection if your WiFi connection is not connecting you to the internet. However, I have not tested this with connections that need you to login.