function Login(settings, login = {}) {
    if (Login.prototype.isLogin(login)) {
        // content sha used to determine if login has changes, see Login.prototype.isNew
        this.contentSha = sha1(login.login + sha1(login.raw || ''));
    } else {
        this.allowFill = true;
        this.fields = {};
        this.host = null;
        this.login = '';
        this.recent = {
            when: 0,
            count: 0,
        };
        // a null content sha identifies this a new entry, see Login.prototype.isNew
        this.contentSha = null;
    }

    // Set object properties
    let setRaw = false;
    for (const prop in login) {
        this[prop] = login[prop];
        if (prop === 'raw' && login[prop].length > 0) {
            // update secretPrefix after everything else
            setRaw = true;
        }
    }

    if (setRaw) {
        this.setRawDetails(login['raw']);
    }

    this.settings = settings;
    // This ensures doAction works in detailInterface,
    // and any other view in which it is necessary.
    this.doAction = helpersUI.withLogin.bind({
        settings: settings, login: login
    });
}
Login Constructor()

@since 3.8.0

@param {object} settings
@param {object} login (optional) Extend an existing
     login object to be backwards and forwards compatible.