 
     { account, replacementToken } = options
 
-    $.cookie 'clientId', replacementToken  if replacementToken
+    if replacementToken and replacementToken isnt $.cookie 'clientId'
+      $.cookie 'clientId', replacementToken
 
     @accountChanged account
 

          {entryPoint} = KD.config
          KD.getSingleton('router').handleRoute lastRoute or '/Activity', {replaceState: yes, entryPoint}

  setVisitor:(visitor)-> @visitor = visitor
  getVisitor: -> @visitor
  getAccount: -> KD.whoami()


    # async clientId change checking procedures causes
    # race conditions between window reloading and post-login callbacks
    cookieChangeHandler = do (cookie = $.cookie 'clientId') => =>
      cookieExists = cookie?
      cookieMatches = cookie is ($.cookie 'clientId')
      cookie = $.cookie 'clientId'
