Likewise asking for social media password is pretty dangerous even if it's not specifically illegal because it opens you up to claims that you found something on the account that revealed some protected class status.
(And, sadly, Title VII, the federal anti-discrimination law, does not protect against sexual orientation. In many states it is perfectly legal to fire people for being gay. A bill to fix this situation has been stalled in Congress for nearly two decades.)