Question: Who was the president that signed the legislation that gave the freedom to the court to rule the way it ruled in the Dred Scott Decision?

<P0-S0> Dred Scott v. Sandford, 60 U.S. 393 (1857) , also known simply as the Dred Scott case, was a landmark decision by the United States Supreme Court on US labor law and constitutional law. <P0-S1>  It held that "a negro, whose ancestors were imported into [the U.S.], and sold as slaves", whether enslaved or free, could not be an American citizen and therefore had no standing to sue in federal court, and that the federal government had no power to regulate slavery in the federal territories acquired after the creation of the United States. <P0-S2>  Dred Scott, an enslaved man of "the negro African race" who had been taken by his owners to free states and territories, attempted to sue for his freedom. <P0-S3>  In a 7–2 decision written by Chief Justice Roger B. Taney, the court denied Scott's request. <P0-S4>  The decision was only the second time that the Supreme Court had ruled an Act of Congress to be unconstitutional. <SEP> <P1-S0> The Freeport Doctrine was articulated by Stephen A. Douglas at the second of the Lincoln-Douglas debates on August 27, 1858, in Freeport, Illinois. <P1-S1>  Former one-term U.S. Representative Abraham Lincoln was campaigning to take Douglas' U.S. Senate seat by strongly opposing all attempts to expand the geographic area in which slavery was practiced. <P1-S2>  Lincoln tried to force Douglas to choose between the principle of popular sovereignty proposed by the Kansas-Nebraska Act (which left the fate of slavery in a U.S. territory up to its inhabitants), and the majority decision of the United States Supreme Court in the case of "Dred Scott v. Sandford", which stated that slavery could not legally be excluded from U.S. territories (since Douglas professed great respect for Supreme Court decisions, and accused the Republicans of disrespecting the court, yet this aspect of the "Dred Scott" decision was contrary to Douglas' views and politically unpopular in Illinois). <P1-S3>  Instead of making a direct choice, Douglas' response stated that despite the court's ruling, slavery could be prevented from any territory by the refusal of the people living in that territory to pass laws favorable to slavery. <P1-S4>  Likewise, if the people of the territory supported slavery, legislation would provide for its continued existence. <SEP> <P2-S0> Dred Scott (c. 1799 – September 17, 1858) was an enslaved African American man in the United States who unsuccessfully sued for his freedom and that of his wife and their two daughters in the "Dred Scott v. Sandford" case of 1857, popularly known as the "Dred Scott Decision". <P2-S1>  Scott claimed that he and his wife should be granted their freedom because they had lived in Illinois and the Wisconsin Territory for four years, where slavery was illegal. <P2-S2>  The United States Supreme Court decided 7–2 against Scott, finding that neither he nor any other person of African ancestry could claim citizenship in the United States, and therefore Scott could not bring suit in federal court under diversity of citizenship rules. <P2-S3>  Moreover, Scott's temporary residence outside Missouri did not bring about his emancipation under the Missouri Compromise, which the court ruled unconstitutional as it would "improperly deprive Scott's owner of his legal property". <SEP> <P3-S0> The Missouri Compromise is the title generally attached to the legislation passed by the 16th United States Congress on May 8, 1820. <P3-S1>  The measures provided for the admission of Maine as a state along with Missouri as a slave state, thus maintaining the balance of power between North and South. <P3-S2>  As part of the compromise, slavery was prohibited North of the 36°30′ parallel, excluding Missouri. <P3-S3>  President James Monroe signed the legislation on April 6, 1820.