add disconnect cmd for console
improve console tst code.