fixes for network state change / suspend handling
also properly handles server restarts, and autologin