code: function isAuthenticated(username, password) {
  
      var userIndex = userdb.users.findIndex(function (user) {
          return (user.name === username && user.password === password);
      });
  
      return userIndex != -1;
  }
docs: Check if the user exists in database