// set handler
con.setConnectionHandler(handler);
// connect and login. this is from where connectionFailed() may be called for example
con.login("cdemon","........");
//System.out.println("3) "+(System.currentTimeMillis()-current)+"ms.");
// login calls connectionInitialized() below which sets isThere to true
while(!isThere)