String returnToUrl = returnToUrl();
String url = manager.getAuthenticationUrl(id, returnToUrl);
log.info("Redirecting to:" + url);
if (url != null) {
Redirect redirect = Redirect.instance();
redirect.captureCurrentView();
FacesManager.instance().redirectToExternalURL(url);
}
}