Index: src/edu/ucsb/nceas/metacat/AuthLdap.java
===================================================================
--- src/edu/ucsb/nceas/metacat/AuthLdap.java	(revision 3022)
+++ src/edu/ucsb/nceas/metacat/AuthLdap.java	(revision 3023)
@@ -121,7 +121,6 @@
     	// Check the usename as passed in
         logMetacat.info("Calling ldapAuthenticate");
         logMetacat.info("with user as identifier: " + identifier);
-        logMetacat.info("and password as: " + password);
 
         authenticated = ldapAuthenticate(identifier, password, 
         		(new Boolean(MetaCatUtil.getOption("onlySecureLDAPConnection"))).booleanValue());
@@ -131,7 +130,7 @@
         	logMetacat.info("Looking up DN for: " + identifier);
         	identifier = getIdentifyingName(identifier, ldapUrl, ldapBase);
         	if(identifier == null){
-        		logMetacat.warn("No DN found from getIdentifyingName");
+        		logMetacat.info("No DN found from getIdentifyingName");
         		return authenticated;
         	}
         	
@@ -145,16 +144,14 @@
         		logMetacat.debug("identifier starts with ldap");
 
         		refUrl = identifier.substring(0, identifier.lastIndexOf("/") + 1);
-        		logMetacat.info("Ref ldapUrl: " + refUrl);
         		int position = identifier.indexOf(",");
         		int position2 = identifier.indexOf(",", position + 1);
+        		
         		refBase = identifier.substring(position2 + 1);
-        		logMetacat.info("Ref ldapBase: " + refBase);
         		identifier = identifier.substring(identifier.lastIndexOf("/") + 1);
-        		logMetacat.info("Trying: " + identifier);
+        		
         		logMetacat.info("Calling ldapAuthenticate");
         		logMetacat.info("with user as identifier: " + identifier);
-        		logMetacat.info("and password as: " + password);
         		logMetacat.info("and refUrl as: " + refUrl);
         		logMetacat.info("and refBase as: " + refBase);
 
@@ -163,12 +160,11 @@
                 			.booleanValue());
         	} else {
         		logMetacat.info("identifier doesnt start with ldap");
+        		identifier = identifier + "," + ldapBase;
+        		
         		logMetacat.info("Calling ldapAuthenticate");
         		logMetacat.info("with user as identifier: " + identifier);
-        		logMetacat.info("and password as: " + password);
-
-        		identifier = identifier + "," + ldapBase;
-        		logMetacat.info("Trying: " + identifier);
+        		
         		authenticated = ldapAuthenticate(identifier, password,
             		(new Boolean(MetaCatUtil.getOption("onlySecureLDAPConnection"))).booleanValue());
         	}
@@ -175,7 +171,6 @@
         }
     }
     catch (NullPointerException e) {
-    	logMetacat.error("NullPointerException b' password is null");
     	logMetacat.error("NullPointerException while authenticating in " +
                         "AuthLdap.authenticate: " + e);
     	e.printStackTrace();
@@ -221,7 +216,6 @@
 	  
 	  boolean authenticated = false;
 		
-	  logMetacat.warn(secureConnectionOnly + "");
 	  String server = "";
 	  String userDN = "";
 	  logMetacat.info("dn is: " + dn);
@@ -282,9 +276,12 @@
 	                                 + ioe.getMessage());
 			   
 			   if(secureConnectionOnly){
-			   	  return authenticated;
+			   	  
+				   return authenticated;
+			   
 			   } else {
-				
+
+				   logMetacat.info("Trying to authenticate without TLS");
 				   env.put(Context.SECURITY_AUTHENTICATION, "simple");
 				   env.put(Context.SECURITY_PRINCIPAL, userDN);
 				   env.put(Context.SECURITY_CREDENTIALS, password);
@@ -305,7 +302,6 @@
 	   } catch (NamingException e) {
 		   logMetacat.warn("Caught NamingException in login: " + e.getClass().getName());
 		   logMetacat.info(e.toString() + "  " + e.getRootCause());
-		   e.printStackTrace();
        }
 
        return authenticated;
@@ -333,16 +329,16 @@
       try {
     	  int position = user.indexOf(",");
           String uid = user.substring(user.indexOf("=") + 1, position);
-          logMetacat.warn("uid is: " + uid);
+          logMetacat.info("uid is: " + uid);
           String org = user.substring(user.indexOf("=", position + 1) + 1,
                                         user.indexOf(",", position + 1));
-          logMetacat.warn("org is: " + org);
+          logMetacat.info("org is: " + org);
            
           DirContext sctx = new InitialDirContext(env);
           SearchControls ctls = new SearchControls();
           ctls.setSearchScope(SearchControls.SUBTREE_SCOPE);
           String filter = "(&(uid=" + uid + ")(o=" + org + "))";
-          logMetacat.warn("Filter: " + filter);
+          logMetacat.warn("Searching for DNs with following filter: " + filter);
           
           for (boolean moreReferrals = true; moreReferrals;) {
               try {
@@ -360,8 +356,7 @@
                   moreReferrals = false;
               } catch (ReferralException e) {
             	  logMetacat.info("Got referral: " + e.getReferralInfo());
-
-                  // Point to the new context from the referral
+            	  // Point to the new context from the referral
                   if (moreReferrals) {
                       sctx = (DirContext) e.getReferralContext();
                   }
