Improve ConnectDialog implementation.