diff --git a/includes/LDAPInterface.inc b/includes/LDAPInterface.inc
index ff773c5..8365060 100644
--- a/includes/LDAPInterface.inc
+++ b/includes/LDAPInterface.inc
@@ -128,16 +128,16 @@ class LDAPInterface {
   }
 
   function initConnection() {
-    if (!$con = ldap_connect($this->server, $this->port)) {
+    if (!$this->connection = ldap_connect($this->server, $this->port)) {
       watchdog('ldap', 'LDAP Connect failure to @server:@port', array('@server' => $this->server, '@port' => $this->port), WATCHDOG_ERROR);
       return;
     }
 
-    ldap_set_option($con, LDAP_OPT_PROTOCOL_VERSION, 3);
-    ldap_set_option($con, LDAP_OPT_REFERRALS, 0);
+    ldap_set_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, 3);
+    ldap_set_option($this->connection, LDAP_OPT_REFERRALS, 0);
     // TLS encryption contributed by sfrancis@drupal.org
     if ($this->tls) {
-      ldap_get_option($con, LDAP_OPT_PROTOCOL_VERSION, $vers);
+      ldap_get_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, $vers);
       if ($vers == -1) {
         watchdog('ldap', 'Could not get LDAP protocol version.', array(), WATCHDOG_ERROR);
         return;
@@ -150,24 +150,28 @@ class LDAPInterface {
         watchdog('ldap', 'Could not start TLS. It does not seem to be supported by this PHP setup.', array(), WATCHDOG_ERROR);
         return;
       }
-      else if (!ldap_start_tls($con)) {
+      else if (!ldap_start_tls($this->connection)) {
         watchdog('ldap', 'Could not start TLS. (Error %errno: %error).', array('%errno' => ldap_errno($con), '%error' => ldap_error($con)), WATCHDOG_ERROR);
         return;
       }
     }
-    $this->connection = $con;
   }
 
   function connectAndBind($dn = '', $pass = '') {
     $this->initConnection();
 
-    $con = $this->connection;
-    if (!$this->bind($dn, $pass)) {
-      watchdog('ldap', 'LDAP Bind failure for user %user. Error %errno: %error', array('%user' => $dn, '%errno' => ldap_errno($con), '%error' => ldap_error($con)));
-      return NULL;
+    if ($this->connection) {
+      if (!$this->bind($dn, $pass)) {
+        watchdog('ldap', 'LDAP Bind failure for user %user. Error %errno: %error', array('%user' => $dn, '%errno' => ldap_errno($this->connection), '%error' => ldap_error($this->connection)));
+        return NULL;
+      }
+      return $this->connection;
     }
+    else {
+      return $false;
+    }
+
 
-    return $con;
   }
 
   function bind($dn, $pass) {
