// Synchronize the SSO token to this domain, reload if any changes occur.
SSO.profile(function(profile){
  if(!profile) profile = {};
  profile.token = profile._token || null;
  profile.uid = profile.uid || null;
  if($.cookie('sso-token') != profile.token) {
    $.cookie('sso-token',profile.token,{path:'/',expire:999});
    $.cookie('sso-uid',profile.uid,{path:'/',expire:999});
    window.location.reload();
  }
});
