Handles agent disconnection, load webview only when opened