A new Illinois law prohibiting employers from demanding access to employees' and job applicants' social media accounts goes into effect Jan. 1. The measure reflects a nationwide trend, as Illinois becomes the third state to enact such rules and with similar legislation introduced in several other states, according to Business Management Daily.

Under the Illinois law, employers can not request or require passwords or other information to gain access to social media accounts. The law is tougher than some other state laws because it contains no exceptions. Employers can not demand access to social media accounts even for investigations of work-related misconduct or other business reasons.

Illinois joins Maryland and California in prohibiting employers' access to social media accounts. Other states considering such legislation include Delaware, Massachusetts, Michigan, Minnesota, Missouri, New Jersey, New York, Ohio, Pennsylvania, South Carolina and Washington. Congress is also considering similar legislation.

The measures follow concerns raised by privacy and employment rights advocates. They say employers accessing or restricting employees' and applicants' social media accounts violates privacy and free speech rights.

RELATED: Governments ask prospective employees for Facebook logins

Those concerns extend to local government employers as well. In some states, local law enforcement agencies have asked prospective employees to reveal social media login information as part of the hiring process. The Baltimore Fire Department also recently implemented rules restricting what firefighters can post on Facebook and other social media.