The first step should be to ban companies from firing their employees for saying unpopular things.
However, i believe strongly in freedom of association. I don't want to work with someone who expresses misogynist opinions on Facebook, I shouldn't have to. Even if she behaves and speaks nothing like that in the office