if (mode === Mode.LOGIN && !this.validateLogin()) {
      this.setError({
        code: 'REQUIRED_LOGIN_FIELDS',
        error: `Please enter ${this.usernameLabel} and ${this.passwordLabel}.`
      });