Which of the following happens during the electrolysis of molten sodium chloride?