final ConnectorConfig cc = conn.getConfig();
try {
logger.info(Messages.getMessage(getClass(), "sforceLoginDetail", cc.getAuthEndpoint(), cc.getUsername()));
LoginResult loginResult = runOperation(LOGIN_OPERATION, conn);
// if password has expired, throw an exception
if (loginResult.getPasswordExpired()) { throw new PasswordExpiredException(Messages
.getString("Client.errorExpiredPassword")); //$NON-NLS-1$
}
// update session id and service endpoint based on response
conn.setSessionHeader(loginResult.getSessionId());
String serverUrl = loginResult.getServerUrl();