It could soon finally be legal to "unlock" cell phones and move from one carrier to another. The US Senate passed a bill last night under "unanimous consent" rules that would make it clear that unlocking phones is legal.

The bill was passed without controversial language about "bulk" unlocking that would have made it difficult to build a business around unlocking phones. It also directs the Librarian of Congress to "consider whether other wireless devices, like tablets, should be eligible for unlocking."

The House of Representatives passed a related bill in February that did include the "bulk unlocking" language that advocacy groups like Public Knowledge objected to. Now the two houses of Congress will need to sync up the bills so a version can be sent to President Barack Obama for a signature.

Consumers' right to unlock is on the verge of becoming law only after the major cell phone companies essentially gave up the fight under pressure from the FCC. They already agreed to enact policies allowing unlocking by February 2015. Now those rights will be codified into law rather than relying on self-regulation.

The legality of "unlocking" has a long and winding history. The 1998 Digital Millennium Copyright Act banned the "circumvention" of copy protection schemes, making the act of unlocking one's own phone against the law. From 2006 to 2012, the Library of Congress granted an "exemption" to copyright law that allowed consumers to unlock their phones in order to change providers. That exemption expired in 2013, and cell phone unlocking went back to being illegal.

Assuming the unlocking bill passes, it will be one of the 113th Congress' few accomplishments. The current Congress has passed 126 laws, many of which were "must pass" bills to fund ongoing government operations. That puts it on track to be the least productive Congress in history. That record is currently held by the 112th Congress, which passed 284 bills before it ended in 2013.