"Human law is law only by virtue of its accordance with right reason; and thus it is manifest that it flows from the eternal law. And in so far as it deviates from right reason it is called an unjust law; in such case it is no law at all, but rather a species of violence." --- Thomas Aquinas, Summa theologiae, Ia-Ilae, q. xciii, art. 3, ad 2m.
"...where a law is enacted contrary to reason, or to the eternal law, or to some ordinance of God, obedience is unlawful, lest, while obeying man, we become disobedient to God. Thus, an effectual barrier being opposed to tyranny, the authority in the State will not have all its own way, but the interests and rights of all will be safeguarded: the rights of individuals, of domestic society, and of all the members of the commonwealth; all being free to live according to law and right reason; and in this, as We have shown, true liberty really consists...If, then, by anyone in authority, something be sanctioned out of conformity with the principles of right reason, and consequently hurtful to the commonwealth, such an enactment can have no binding force of law, as being no rule of justice, but certain to lead men away from that good which is the very end of civil society. (Pope Leo XIII, Libertas # 10, 13)
It is not right for either the citizen or the family to be absorbed by the state; it is proper that the individual and the family should be permitted to retain their freedom of action, so far as this is possible without jeopardizing the common good."---Rerum Novarum
The common good aims for the whole people, the Church teaches, not just representatives. What we must make sure of is that our actions are just, and be willing to accept personal consequences for them.
The Catholic Encyclopedia, 1907 on Civil Authority states:
The State cannot command what God could not command, for instance, idolatry. The authority of the State is absolute, that is to say, full and complete in its own sphere, and subordinate to no other authority within that sphere. But the authority of the State is not arbitrary; it is not available for the carrying out of every whim and caprice. Arbitrary government is irrational government; now no government is licensed to set reason aside. The government of God Himself is not arbitrary; as St. Thomas says: "God is not offended by us except at what we do against our own good" (Contra Gentiles, III, 122).
"The arbitrary use of authority is called tyranny. Such is the tyranny of an absolute monarch, of a council, of a class, or of a majority. The liberty of the subject is based on the doctrine that the State is not omnipotent. Legally omnipotent every State must be, but not morally. A legal enactment may be immoral, and then it cannot in conscience be obeyed; or it may be ultra vires, beyond the competence of the authority that enacts it, in which case compliance with the law is not a matter of obedience, but of prudence. In either case the law is tyrannical, and "a tyrannical law, not being according to reason, is not, absolutely speaking, a law, but rather a perversion of law" (St. Thomas, Summa Theol., I-II.92.1 ad 4)