The clause is there to give powers to congress. The 2nd amendment is there to enumerate a God given right of the people. The granting of a power to congress doesn't remove the rights of the citizens. It merely clarifies what congress can do with the militia. Fairly simple when you think about the balance of other powers and rights laid out in the constitution.
And the language of the 2nd is very clear - the militia is there for "the security of a free State". Note the word FREE is there - not just State or Republic or Country. But one that is Free.
If the founders intended us to be able to overthrow the government by force any time we felt like it, why did they put in a clause to allow Congress to call forth the militia to quell just such an insurrection?