code: function authenticateAccount() {
  
    var authcRequest = {
      username: accountEmail, //we could've entered the username instead
      password: 'Changeme1!'
    };
  
    return application.authenticateAccount(authcRequest, function(err, result) {
      if (err) throw err;
  
      return result.getAccount(function(err2, theAccount) { //this is cached and will execute immediately (no server request):
        if(err2) throw err2;
  
        account = theAccount;
  
        console.log('Authenticated account:');
        console.log(account);
  
        //authentication was successful, so we ordinarily have no need to send a
        //password reset email right now, but hey - this is a quickstart and we're
        //trying to show stuff!  So kick off the password reset workflow just for fun:
        return sendPasswordResetEmail(); //next quickstart step
      });
    });
  }
docs: ================================================== Step 4 - Authenticate an account ==================================================