It is the law to register your own passport in hotels.
Any other accommodation, you must register with your passport at the local police station within 24 hours of arrival.
Overstaying your visa can cause fines up to 5,000 yuan and deportation
It is the law to carry your residence certificate or passport for possible examination by police and be open to inspection by to inspection by police in residential properties.
It is illegal to work without a working permit and residence permit. Penalty for this could be very serious with possible deportaion.