Maybe that's a good law in theory. But as soon as such a measure was on the agenda, it would be complicated by the addition of various provisos, exceptions, and limits, each inserted at the behest of a well-heeled interest group with access to majority-party legislators on the relevant committees.
If there's one area I want Congress to stay away from, it's copyright law. Under the system of campaign finance and interest group lobbying that we have now, there is no chance---none---of an improvement if they get involved.
I think it would be very difficult. Arguably, by controlling access to their network, Google is putting access control and restriction on all of the works in their web cache. Similarly, requiring a login on a server restricts access to the Oracle instance running on it.
These sorts of issues already exist in copyright law, and have been covered pretty well. It seems to me that this would essentially be an extension of the first sale doctrine.
But how would that help? A publisher having millions of locked-in customers could easily force authors to give this permission. The individual option to say no to a deal is a very weak weapon in such situations.
"It shall be unlawful to place any kind of access control or restriction on a copyrighted work without the permission of the copyright holder."
It will need some sort of exemption for personal use (like an encrypted hard disk).