Setup logger and pretty log formatting
Dynamically choose user/passwd vs. cert based login, and fallback to user/passwd if cert fails
Handle VC connection timeouts
Some cleanup