code: function(newuser, newaliases) {
  		console.log("setUser", newuser, newaliases);
  		var oldxid = Login.user && Login.user.xid;
  		if (Login.user && Login.user.xid === newuser.xid) {
  			// keep old info... but newuser overrides
  			newuser = $.extend({}, Login.user, newuser);
  			// TODO extend aliases
  		}
  		// set user
  		Login.user = newuser;
  		// service
  		if ( ! Login.user.service) {
  			Login.user.service = getService(Login.user.xid);
  		}
  		// set aliases
  		if (newaliases && newaliases.length !== 0) {
  			Login.aliases = newaliases;
  			assert(newaliases[0].xid, newaliases);
  		} else if (newuser.xid === oldxid) {
  			// leave as is
  		} else {
  			// aliases = just the user
  			Login.aliases = [newuser];
  		}
  		Cookies.set(COOKIE_UXID, Login.user.xid, {path: COOKIE_PATH});
  		// webtoken: set by the server
  		if (oldxid != newuser.xid) {
  			Login.change();
  		}
  	}
docs: This is normally for internal use. It calls Login.change()
  @param {User} newuser
  @param {?User[]} newaliases