async function listLoginEvents(auth) {
  const service = google.admin({version: 'reports_v1', auth});
  const res = await service.activities.list({
    userKey: 'all',
    applicationName: 'login',
    maxResults: 10,
  });
  const activities = res.data.items;
  if (!activities || activities.length === 0) {
    console.log('No logins found.');
    return;
  }

  console.log('Logins:');
  activities.forEach((activity) => {
    console.log(
        `${activity.id.time}: ${activity.actor.email} (${activity.events[0].name})`,
    );
  });
}
Lists the last 10 login events for the domain.

@param {google.auth.OAuth2} auth An authorized OAuth2 client.