wintest: put most of the main program login in wintest.py