People who hold unauthorised protests face prosecution under plans being drawn up by the government.