Supreme Court to weigh state legislatures' power over federal elections