assembleUserInfo = function(username, password) {
  if (username && password) {
    return username + ':' + password + '@';
  } else if (username) {
    return username + '@';
  } else if (password) {
    return ':' + password + '@';
  } else {
    return '';
  }
}
@param {?string} username
@param {?string} password
@return {string} The serialized userinfo string