diff --git a/PhutilAuthAdapterShibboleth.php b/PhutilAuthAdapterShibboleth.php
index 50cbac8..220c95d 100644
--- a/PhutilAuthAdapterShibboleth.php
+++ b/PhutilAuthAdapterShibboleth.php
@@ -1,202 +1,204 @@
 <?php
 
 final class PhutilAuthAdapterShibboleth extends PhutilAuthAdapter {
 
   // Configuration.
   private $shibSessionIdField;
   private $shibApplicationIdField;
   private $useridField;
   private $usernameField;
   private $realnameField;
   private $firstnameField;
   private $lastnameField;
   private $emailField;
   private $pageURIPattern;
   private $imageURIPattern;
   private $usernameFromRealname;
 
   // Specific User Request Information.
   private $shibSessionId;
   private $shibApplicationId;
   private $userid;
   private $username;
   private $realname;
   private $firstname;
   private $lastname;
   private $email;
 
   //
   // Configuration setters.
   //
   public function setShibSessionIdField($value) {
     $this->shibSessionIdField = $value;
     return $this;
   }
 
   public function setShibApplicationIdField($value) {
     $this->shibApplicationIdField = $value;
     return $this;
   }
 
   public function setUseridField($value) {
     $this->useridField = $value;
     return $this;
   }
 
   public function setUsernameField($value) {
     $this->usernameField = $value;
     return $this;
   }
 
   public function setRealnameField($value) {
     $this->realnameField = $value;
     return $this;
   }
 
   public function setEmailField($value) {
     $this->emailField = $value;
     return $this;
   }
 
   public function setFirstnameField($value) {
     $this->firstnameField = $value;
     return $this;
   }
 
   public function setLastnameField($value) {
     $this->lastnameField = $value;
     return $this;
   }
 
   public function setPageURIPattern($value) {
     $this->pageURIPattern = $value;
     return $this;
   }
 
   public function setImageURIPattern($value) {
     $this->imageURIPattern = $value;
     return $this;
   }
 
   public function setIsGeneratedUsername($value) {
     $this->usernameFromRealname = $value;
     return $this;
   }
 
   //
   // Implementation of PhutilAuthAdapter interface.
   // User information getters.
   //
 
   public function getAccountID() {
     return $this->userid;
   }
 
   public function getAdapterType() {
     return 'shibboleth';
   }
 
   public function getAdapterDomain() {
     return 'self';
   }
 
   public function getAccountEmail() {
     return $this->email;
   }
 
   public function getAccountName() {
     return $this->username;
   }
 
   public function getAccountURI() {
     if (strlen($this->pageURIPattern)) {
       return sprintf($this->pageURIPattern, $this->username);
     }
     return null;
   }
 
   public function getAccountImageURI() {
     if (strlen($this->imageURIPattern)) {
       return sprintf($this->imageURIPattern, $this->username);
     }
     return null;
   }
 
   public function getAccountRealName() {
     return $this->realname;
   }
 
   //
   // Extraction of user information from environement variables.
   //
   public function getEnvNames() {
     return array(
       $this->shibSessionIdField,
       $this->shibApplicationIdField,
       $this->useridField,
       $this->usernameField,
       $this->realnameField,
       $this->firstnameField,
       $this->lastnameField,
       $this->emailField,
     );
   }
 
   public function setUserDataFromRequest($env) {
 
     $this->shibSessionId     = $env[$this->shibSessionIdField];
     $this->shibApplicationId = $env[$this->shibApplicationIdField];
     $this->userid            = $env[$this->useridField];
     $this->username          = $env[$this->usernameField];
     $this->realname          = $env[$this->realnameField];
     $this->firstname         = $env[$this->firstnameField];
     $this->lastname          = $env[$this->lastnameField];
     $this->email             = $env[$this->emailField];
 
     if (!strlen($this->shibSessionId)
       || !strlen($this->shibApplicationId)
       || !strlen($this->userid)
       || (!strlen($this->username) && !$this->usernameFromRealname)
       || (!strlen($this->firstname) && !strlen($this->lastname) && $this->usernameFromRealname)
       || !strlen($this->realname)
       || !strlen($this->email)
       ) {
       phlog("SHIB ERROR");
-      phlog("UserID: "      . $this->userid     . " (" . strlen($this->userid) . ")");
-      phlog("Username: "    . $this->username   . " (" . strlen($this->username) . ")");
-      phlog("Realname: "    . $this->realname   . " (" . strlen($this->realname) . ")");
-      phlog("Firstname: "   . $this->firstname  . " (" . strlen($this->firstname) . ")");
-      phlog("Lastname: "    . $this->lastname   . " (" . strlen($this->lastname) . ")");
-      phlog("Email: "       . $this->email      . " (" . strlen($this->email) . ")");
+      phlog("SessionID: "       . $this->shibApplicationId  . " (" . strlen($this->shibApplicationId)   . ")");
+      phlog("ApplicationID: "   . $this->shibSessionId      . " (" . strlen($this->shibSessionId)       . ")");
+      phlog("UserID: "          . $this->userid             . " (" . strlen($this->userid)              . ")");
+      phlog("Username: "        . $this->username           . " (" . strlen($this->username)            . ")");
+      phlog("Realname: "        . $this->realname           . " (" . strlen($this->realname)            . ")");
+      phlog("Firstname: "       . $this->firstname          . " (" . strlen($this->firstname)           . ")");
+      phlog("Lastname: "        . $this->lastname           . " (" . strlen($this->lastname)            . ")");
+      phlog("Email: "           . $this->email              . " (" . strlen($this->email)               . ")");
       return false;
     }
 
     if ($this->usernameFromRealname) {
       for ($len=0; $len < strlen($this->firstname); $len++) {
         $username = $this->generateUsername($len);
         $user_exists = id(new PhabricatorPeopleQuery())
           ->setViewer(PhabricatorUser::getOmnipotentUser())
           ->setLimit(1)
           ->withUsernames(array($username))
           ->execute();
         $this->username = $username;
         if (!$user_exists) {
           break;
         }
       }
     }
 
     return $this;
   }
 
   private function generateUsername($len) {
     return $this->cleanName($this->lastname) . substr($this->cleanName($this->firstname), 0, $len);
   }
 
   private function cleanName($name) {
 	$clean = iconv('UTF-8', 'ASCII//TRANSLIT', $name);
 	$clean = preg_replace("/[ -]/", '', $clean);
 	$clean = strtolower(trim($clean));
 	return $clean;
   }
 }