final CommandCenterFactory centerFactory = new CommandCenterFactory().setUrl(centerUrl, centerPort);
// use authentication token if it is set
if (token != null && token.trim().length() > 0) {
log.info("Using authentication token '{}' to connect to LiveRebel Command Center running on {}", token, centerAddress);
centerFactory.authenticate(token);
}
else {
log.info("Didn't find authentication token from {} file - using userName='{}' and password='{}' to connect to LiveRebel Command Center running on {}",
LR_CLI_PROPERTIES, userName, password, centerAddress);
centerFactory.authenticate(userName, password);