China’s government signed new internet rules into law Friday, including requirements for all users to register with their real names.