log.trace("Register SOCIAL LOGIN USER: " + account.getUsername());
// building granted authorities
final Collection<GrantedAuthority> authorities = ConvertDomainsToSecurityContext
.convertEnMePermission(account.getSecUserPermissions());
// create user detail based on user account.
final EnMeSocialUserAccount details = SecurityUtils.convertUserAccountToUserDetails(accountConnection);
// set the social credentials permission.
details.setSocialCredentials(true);
final SocialAuthenticationToken token = new SocialAuthenticationToken(details, authorities);
token.setProfileId(accountConnection.getSocialProfileId());
token.setProvider(accountConnection.getAccounType());
//clear the context.
SecurityContextHolder.clearContext();