Who was president of the Soviet Union when it came to an end?