Issue #1413286 by morningtime: Fix the check authentication function to define the DRUPAL_ROOT constant