docs: function cmd_login(args, done) {
      var seneca = this
      var user = args.user
      var why
      var loginent = seneca.make(login_canon)
  
      if (!user.active) {
        seneca.log.debug('login/fail', (why = 'not-active'), user)
        return done(null, { ok: false, why: why, user: user })
      }
  
      if (
        options.failedLoginCount &&
        user.failedLoginCount >= options.failedLoginCount
      ) {
        seneca.log.debug('login/fail', (why = 'locked-out'), user)
        return done(null, { ok: false, why: why })
      }
      if (args.auto) {
        return make_login(user, 'auto')
      } else {
        seneca.act(
          {
            role: role,
            cmd: 'verify_password',
            proposed: args.password,
            pass: user.pass,
            salt: user.salt
          },
          function(err, out) {
            if (err) return done(err)
            if (!out.ok) {
              seneca.log.debug('login/fail', (why = 'invalid-password'), user)
              cmd_increment_lock(seneca, user.id, false, function(err) {
                if (err) return done(err)
                done(null, { ok: false, why: why })
              })
            } else return make_login(user, 'password')
          }
        )
      }
  
      function make_login(user, why) {
        var cleanargs = seneca.util.clean(_.clone(args))
  
        var login = loginent.make$(
          seneca.util.argprops(
            {},
            cleanargs,
            {
              id$: Uuid(),
              nick: user.nick,
              user: user.id,
              when: new Date().toISOString(),
              active: true,
              why: why
            },
            'role,cmd,password'
          )
        )
  
        login.token = login.id$ // DEPRECATED
  
        login.save$(function(err, login) {
          if (err) return done(err)
          cmd_increment_lock(seneca, user.id, true, function(err) {
            if (err) return done(err)
  
            seneca.log.debug('login/ok', why, user, login)
            done(null, { ok: true, user: user, login: login, why: why })
          })
        })
      }
    }