Fix several fatal errors and notices when using libAuthentication in Drupal