A judge in Sacramento has ordered the secretary of state's office to add about 5,000 signatures to the total submitted by supporters of a voter referendum that seeks to overturn a new California law guaranteeing certain rights to transgender students in public schools.