Under federal law are certain specific protected classes of employees. Discrimination in hiring/firing decisions based on any of these classes is illegal. They are:
Race.
Color.
Religion or creed.
National origin or ancestry.
Sex.
Age.
Physical or mental disability.
Veteran status.
Genetic information.
Citizenship
Everything else is fair game. Sexual orientation is a perfectly legitimate reason to fire someone under current federal law.
Age discrimination is really not enforced though, yes it's technically illegal, but pro-publica had a whole bunch of articles on how it's not enforced even to the degree that other protections are. I live in fear of eventually reaching my un-employable age (50 something I guess).