First attempt (but heavily tested) at a PHP login verification based on groups.  This was necessary to restore functionality that was lost when we moved from Drupal6 to Drupal7.