Yes, I believe that the purpose of the government is to assure and protect the rights of the citizens because the citizens give the power to their representatives to defend their rights and pass laws that will help the government with that.
I believe that the government does that today because now democracy is even more spread, all people have the right to vote and have ways of demanding things and solutions from the government, which makes it even harder for the government to ignore people’s demands.
It is important to say that after the end of WWII the notion of rights being protected by the government became even more important with the adoption of the concept of human dignity (that is a natural right just like the ones John Locke appointed) in many constitutions around the world.