Make `login` a function expression here to be consistent with what you have below