Two U.S. senators are preparing bills that would protect users of social media including Facebook -- its founder, Mark Zuckerberg, is shown here -- from having to disclose passwords to prospective employers. REUTERS

Two U.S. senators are preparing laws to protect users of Facebook and other social media from having to disclose passwords to prospective employers.

The legislation would also provide protection from compromising photos that have been posted online.

Sen. Richard Blumenthal, a Democrat from Connecticut, said he's drafting laws that would deal with both problems. It's not just about Facebook, it's about all social media, he told the Financial Times.

In March, after media reports that some companies and government agencies had asked job applicants to hand over passwords to their personal profiles on social-media sites, the House of Representatives voted against banning the practice. The ban had been included as an amendment to another bill.

Sen. Charles Schumer, a New York Democrat, said he, too, is drafting his own password-protection bill. He has asked the Justice Department for its opinion on whether the reported practice violates either of two federal laws -- the Stored Communication Act and the Computer Fraud and Security Act.

It is vital that all individuals be allowed to determine for themselves what personal information they want to make public, Schumer said.

Any action on the Blumenthal or Schumer proposals will come only after the Senate returns from its recess, on April 16.

A petition in support of new laws circulated by the Progressive Change Campaign Committee collected 55,000 signatures in four days. We will work witn congressional leaders...to investigate and hold employers responsible for any violation of employees' privacy rights, said Conor Kennedy, a senior committee associate.

Facebook Inc., whose signature website's 845 million users make it the biggest social-networking company by far, has criticized the employment-screening practice. We don't think it's the right thing to do, a company statement said.

As a user, you shouldn't be forced to share your private information and communications just to get a job, Facebook's chief privacy officer, Erin Egan, wrote in a blog post.

Current laws bar employers from discriminating against job applicants on grounds such as race, gender, age, national origin, disability and pregnancy. Social-media outlets such as Facebook and the namesake site of LinkedIn Corp. (Nasdaq: LNKD), however, provide each user extensive details posted by other users.

Blumenthal, who was Connecticut's longtime attorney general before entering the Senate last year, said letting employers examine social-media accounts is like allowing them to root through an applicant's bedroom at home. Exemptions, he added, should be made for law enforcement professionals or those seeking jobs tied to national security.