For the Captive Portal auto-login problem (not the network disconnecting issue)...
Coova, a captive portal implemtnation has some client tools: CoovaFX is a Firefox extension for doing login, and CoovaAX is an Android app. These use WISPr for authentication.
There are also some other Android applications for the same purpose; some are specific to certain providers, others use a particular standard.
I suspect that in most cases where a captive portal is redirecting requests to its login screen, these standards are not supported, however if they are then automating the login should be easier than with a non-standard browser screen.
There are some very basic scripts by Laurent Gighonis, but they don't look very comprehensive and probably only cover a few providers...