The etymology is false. "log in" is a corruption of "log on" - possibly a conflation of "log on" and "clock/sign in".
"Log on" was (and still is) a command in some systems indicating that a connection session to a mainframe was being started. Literally it means "start logging" - start keeping a record of actions taken.
As it was often the first command issued to a system, and often required authentication, the "authentication" and "log start" steps were frequently combined, so that a command such as
"log on username password"
would both start the log, authorise the session to start and form the first log entry of the session.
In some systems, logging of all commands was an equivalent of a "debug mode" - in others is served as a (rather rudimentary) audit trail.
I've been wading through my notes from Uni, but I can't find the reference that I wanted; I originally heard this etymology from a lecturer who was one of the original developers of Prestel, and of TV Text services like Oracle. It would be great if someone could find out which systems used the "log on" command solely to start the log. I'll keep looking.