This happened to me for a bit as well, in order to stop the login page from disconnecting me after a while I went and got a tab refresher extension for my browser and set it to refresh every 40 secs. The login page hasn't disconnected me ever since. (I use Chrome with the Easy Auto Refresh extension but it won't matter which browser or extension you choose to use as long as it works for you.)
I believe if the login page doesn't manage to refresh within 60 secs it will disconnect you, which with lag or a slow connection would happen a lot.
Hope this helps!