The Constitutions of the Soviet Union were modeled after the 1918 Russian Constitution established by the Russian Soviet Federative Socialist Republic, the immediate predecessor and a constituent republic of the Soviet Union. These constitutions shared and upheld most basic provisions including the Soviet Union as a socialist state, the leadership of the working class, the forms of social property, and called for a system of soviets to exercise governmental authority. Soviet constitutions declared certain political rights, such as freedom of speech, freedom of assembly, and freedom of religion, and inline with the state Marxist-Leninist ideology also identified a series of economic and social rights, as well as a set of duties of all citizens. Soviet constitutions established the bodies of the Government of the Soviet Union, outlined democratic rights, and stated the legislature was to be elected at periodical elections. Soviet constitutions became progressively longer and detailed, featuring more articles and provisions which generously expanded the rights and freedoms of the Soviet people including the right to housing and right to work. The 1936 Constitution received amendments in 1944 to allow the Soviet Union's constituent republics to be recognized as sovereign states in international law, resulting in the Ukrainian SSR and Byelorussian SSR joining the United Nations General Assembly as founding members in 1945. The 1924 Constitution and 1936 Constitution were enacted by the Congress of Soviets, the supreme governing body of the Soviet Union since its founding in 1922. The Congress of Soviets dissolved itself upon enactment of the 1936 Constitution, replacing itself as supreme governing body with the Supreme Soviet of the Soviet Union which later enacted the 1977 Constitution. On the surface, the Soviet constitutions resembled those adopted in the West, but differences between Soviet and Western constitutions overshadowed their similarities. Soviet constitutions mainly served as a means to legalize and justify the one-party state and totalitarian rule of the Communist Party of the Soviet Union which had been de facto since Stalin's rise to power in the aftermath of the death of Lenin and exile of Trotsky. The latter two Soviet constitutions declared the "leading role" of the CPSU in government and society. Many constitutional rights were not respected and the CPSU openly violated them due to the widespread political repression in the Soviet Union. Citizens had no legal remedy to pursue if the state failed to respect their rights because Soviet law emphasized economic and social rights over civil and political rights. Legally, the CPSU repressed constitutional rights by designing laws to suit their needs, or rendering them null and void by contradicting with other Soviet laws. An example of the latter includes the 1977 Constitution introducing an amendment granting the official right of constituent republics to secede from the Soviet Union, promised in previous constitutions. However, Articles 74 and 75 stated that when a Soviet constituency introduced laws in contradiction to Supreme Soviet, the laws of the Supreme Soviet would supersede any legal difference, but the Union law which regulated secession was not provided until the very last days of the Soviet Union. The Khrushchev Thaw under Nikita Khrushchev from 1953 to 1964 saw greater attempts at respecting the constitution, but the beginning of the Era of Stagnation under Leonid Brezhnev reversed these attempts. During perestroika in the late 1980s, the 1977 Constitution helped provide a framework for the emergence of extended democracy. The Constitution of the Soviet Union was effectively repealed upon the dissolution of the Soviet Union on 26 December 1991.