integrated the connect and disconnect calls into the runBrowsers loop