function create_group() {
  var num_nodes = 0;
  var node_names = "";
  $("#resource_list :checked").parent().parent().each(function (index,element) {
    if (element.getAttribute("nodeID")) {
      num_nodes++;
      node_names += element.getAttribute("nodeID") + " "
    }
  });

  if (num_nodes == 0) {
    alert("You must select at least one resource to add to a group");
    return;
  }

  $("#resources_to_add_to_group").val(node_names);
  $("#add_group").dialog({
    title: 'Create Group',
    modal: true,
    resizable: false,
    buttons: {
      Cancel: function() {
        $(this).dialog("close");
      },
      "Create Group": function() {
        var data = $('#add_group > form').serialize();
        var url = get_cluster_remote_url() + "add_group";
        $.ajax({
          type: "POST",
          url: url,
          data: data,
          success: function() {
            Pcs.update();
            $("#add_group").dialog("close");
          },
          error: function (xhr, status, error) {
            alert(
              "Error creating group "
              + ajax_simple_error(xhr, status, error)
            );
            $("#add_group").dialog("close");
          }
        });
      }
    }
  });
}
Authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions.