fix #2025: do not issue unnecessary login attempts

This prevents cgeo from trying to perform network requests when there is no network available. Also, it looks for network connectivity events while on the main screen and relogs in if needed when the network is back.

Closes #2025.