Actually, `log_in` is better.

"Log in" is a verb, while "login" is a noun. `login` (or `log_in`) there is a function/method and it's not used as an attribute nor something similar and as such should have a verb as a name.