diff --git a/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java b/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
index 5c23916..6217c89 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
@@ -11,6 +11,7 @@
 import de.ids_mannheim.korap.interfaces.db.PersistenceClient;
 import de.ids_mannheim.korap.user.KorAPUser;
 import de.ids_mannheim.korap.user.ShibUser;
+import de.ids_mannheim.korap.user.DemoUser;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.BooleanUtils;
 import de.ids_mannheim.korap.utils.TimeUtils;
@@ -49,8 +50,57 @@
         this.jdbcTemplate = (NamedParameterJdbcTemplate) client.getSource();
     }
 
+    // usersettings are fetched plus basic account info, no details, since i rarely use them anyway! (by Hanl)
+    /* Version mit LDAP Authentication - 09.05.17/FB
+     * getAccount(): KorAPUser:  Account muss vorhanden sein.
+     *               DemoUser, DefaultUser: Account nicht vorhanden.
+     */
+    @Override
+    public User getAccount (String username) throws KustvaktException {
+    	
+    	Map<String, String> namedParameters = Collections.singletonMap("username", username);
+        final String sql = "select a.* from korap_users as a where a.username=:username;";
+        User user = null;
+        
+        try {
+            user = this.jdbcTemplate.queryForObject(sql, namedParameters,
+                    new RowMapperFactory.UserMapper());
+            return user;
+        	}
+        catch (EmptyResultDataAccessException ae) {
+            jlog.warn("No user found for name '{}'", username);
+            // if no username, so return a DemoUser , FB.
+            // return User.UserFactory.getDemoUser();
+        	}
+        catch (DataAccessException e) {
+            jlog.warn("Could not retrieve user for name: " + username, e);
+            
+            /* DemoUser and DefaultUser have no account,
+             * so it's ok they are not found.
+            throw new DatabaseException(username, "korap_users",
+                    StatusCodes.DB_GET_FAILED,
+                    "Could not retrieve the user with username: " + username,
+                    username);
+             */
+            }
 
-    // usersettings are fetched plus basic account info, no details, since i rarely use them anyway!
+        // DemoUser or DefaultUser?
+        
+        {	// User cannot be found in SQL DB since LDAP Authentication,
+        	// so create a User Object here.
+        	// TODO: what more data should be stored into it?
+        	// 28.04.17/FB
+        	user = new KorAPUser(); // oder eigentlich new DemoUser oder new DefaultUser.
+        	user.setUsername(username);
+        	return user;
+        }
+        
+        
+    }
+
+    // usersettings are fetched plus basic account info, no details, since i rarely use them anyway! (by Hanl)
+    /* Version before LDAP Authentication - 09.05.17/FB
+    @Deprecated
     @Override
     public User getAccount (String username) throws KustvaktException {
     	
@@ -59,22 +109,7 @@
                 .singletonMap("username", username);
         final String sql = "select a.* from korap_users as a where a.username=:username;";
         User user;
-        
-        // Debug by FB
-        if ( bDEBUG == true )
-        {	// User cannot be found in SQL DB since LDAP Authentication,
-        	// so create a User Object here.
-        	// TODO: what more data should be stored into it?
-        	// 28.04.17/FB
-        	user = new KorAPUser();
-        	user.setUsername(username);
-        	return user;
-        }
-        if( username.equalsIgnoreCase("bodmer") == true )
-        {
-        	return null;
-        }
-        //
+       
         try {
             user = this.jdbcTemplate.queryForObject(sql, namedParameters,
                     new RowMapperFactory.UserMapper());
@@ -92,7 +127,7 @@
         }
         return user;
     }
-
+	*/
 
     @Override
     public int updateAccount (User user) throws KustvaktException {
diff --git a/src/main/java/de/ids_mannheim/korap/security/ac/ResourceFinder.java b/src/main/java/de/ids_mannheim/korap/security/ac/ResourceFinder.java
index 380481d..0d3f495 100644
--- a/src/main/java/de/ids_mannheim/korap/security/ac/ResourceFinder.java
+++ b/src/main/java/de/ids_mannheim/korap/security/ac/ResourceFinder.java
@@ -153,7 +153,7 @@
 
         if (sets.isEmpty()){
             throw new KustvaktException(StatusCodes.NO_VALUE_FOUND, 
-                    "Cannot found public resources with ids: "+id_set.toString());
+                    "Cannot found public "+clazz.toString()+" with ids: "+id_set.toString());
         }
         return sets;
     }
diff --git a/src/main/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManager.java b/src/main/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManager.java
index 483f292..16745bb 100644
--- a/src/main/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManager.java
+++ b/src/main/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManager.java
@@ -412,6 +412,8 @@
             }
 
         // Create a User
+        // TODO: KorAPUser für solche mit einem bestehenden Account
+        //       DefaultUser sonst.
         User user = new KorAPUser();
         user.setUsername(username);
         unknown = user;
