Why should these people have been required to tell Congress whether they were Democrat, Republican, Nazi or Communist? You ask that question, I assume to point out that their constitutional rights may have been violated. I am just using a bit of common sense here, since I am neither an attorney or an expert on the Constitution, but:
If the announced purpose of a group was to overthrow the US government and any member of that group was sworn to work towards achieving that purpose. Then would that person not have entered into a conspiracy to commit treason and thus would have committed a criminal act?
Does the government not have a right to investigate a group, which proposes to take over the country, by methods which are outside of the legal means to do so?
For a self-confessed non-lawyer you state things pretty clearly. Anyone in this country who is called before a Congressional committee can be legally compelled to testify about anything the committee cares to ask about. To refuse to answer such questions is to invite a a contempt of Congress citation.
The Left never likes to accept the legal consequences of civil disobedience. True civil libertarians understand that authentic civil disobedience entails unavoidable legal and financial costs. It is becomeing obvious from the Venona transcripts that the so called "Hollywood Ten" and their melodramatic performance in front of HUAC was part of long-term KGB inspired disinformation campaign.