diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml
index 7976ad5..90437df 100644
--- a/dependency-reduced-pom.xml
+++ b/dependency-reduced-pom.xml
@@ -4,7 +4,7 @@
   <groupId>de.ids_mannheim.korap</groupId>
   <artifactId>Kustvakt-core</artifactId>
   <name>Kustvakt core</name>
-  <version>0.56</version>
+  <version>0.58</version>
   <description>Kustvakt core, basic rest api for testing purposes and default
         interfaces</description>
   <build>
@@ -70,7 +70,7 @@
             <exclude>**/*APITest.java</exclude>
           </excludes>
           <includes>
-            <include>**/*.java</include>
+            <include>de.ids_mannheim.korap.**/*.java</include>
           </includes>
         </configuration>
       </plugin>
diff --git a/pom.xml b/pom.xml
index 52043a2..c0237ee 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>de.ids_mannheim.korap</groupId>
     <artifactId>Kustvakt-core</artifactId>
-    <version>0.56</version>
+    <version>0.58</version>
     <packaging>jar</packaging>
     <name>Kustvakt core</name>
     <description>Kustvakt core, basic rest api for testing purposes and default
@@ -149,7 +149,7 @@
                         <exclude>**/*APITest.java</exclude>
                     </excludes>
                     <includes>
-                        <include>**/*.java</include>
+                        <include>de.ids_mannheim.korap.**/*.java</include>
                     </includes>
                 </configuration>
             </plugin>
diff --git a/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java b/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
index ba271f0..d59c23e 100644
--- a/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
+++ b/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
@@ -34,6 +34,7 @@
         KUSTVAKT_USER.put(Attributes.PASSWORD, "kustvakt2015");
         KUSTVAKT_USER.put(Attributes.EMAIL, "kustvakt@ids-mannheim.de");
         KUSTVAKT_USER.put(Attributes.COUNTRY, "Germany");
+        KUSTVAKT_USER.put(Attributes.ADDRESS, "Mannheim");
         KUSTVAKT_USER.put(Attributes.FIRSTNAME, "Kustvakt");
         KUSTVAKT_USER.put(Attributes.LASTNAME, "KorAP");
         KUSTVAKT_USER.put(Attributes.INSTITUTION, "IDS Mannheim");
diff --git a/src/main/java/de/ids_mannheim/korap/exceptions/EmptyResultException.java b/src/main/java/de/ids_mannheim/korap/exceptions/EmptyResultException.java
index a854bc5..f510ac5 100644
--- a/src/main/java/de/ids_mannheim/korap/exceptions/EmptyResultException.java
+++ b/src/main/java/de/ids_mannheim/korap/exceptions/EmptyResultException.java
@@ -12,7 +12,7 @@
     }
 
     public EmptyResultException(String entity) {
-        super(StatusCodes.EMPTY_RESULTS, "", entity);
+        super(StatusCodes.EMPTY_RESULTS, "No entity found for id", entity);
     }
 
 }
diff --git a/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java b/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
index 34aa013..4c40304 100644
--- a/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
+++ b/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
@@ -9,96 +9,96 @@
     /**
      * 100 status codes for standard system errors
      */
-    public static final Integer EMPTY_RESULTS = 100;
-    public static final Integer REQUEST_INVALID = 101;
+    public static final int EMPTY_RESULTS = 100;
+    public static final int REQUEST_INVALID = 101;
     //fixme: redundancy?!
-    public static final Integer ENTRY_EXISTS = 102;
-    public static final Integer STATUS_OK = 103;
-    public static final Integer UNSUPPORTED_OPERATION = 104;
-    public static final Integer ILLEGAL_ARGUMENT = 105;
-    public static final Integer CONNECTION_ERROR = 106;
-    public static final Integer NOTHING_CHANGED = 107;
-    public static final Integer PARAMETER_VALIDATION_ERROR = 108;
-    public static final Integer DEFAULT_ERROR = 109;
-    public static final Integer NOT_SUPPORTED = 110;
+    public static final int ENTRY_EXISTS = 102;
+    public static final int STATUS_OK = 103;
+    public static final int UNSUPPORTED_OPERATION = 104;
+    public static final int ILLEGAL_ARGUMENT = 105;
+    public static final int CONNECTION_ERROR = 106;
+    public static final int NOTHING_CHANGED = 107;
+    public static final int PARAMETER_VALIDATION_ERROR = 108;
+    public static final int DEFAULT_ERROR = 109;
+    public static final int NOT_SUPPORTED = 110;
 
     /**
      * 400 status codes for account/authentication relevant components
      */
 
-    public static final Integer ACCOUNT_DEACTIVATED = 200;
-    public static final Integer ACCOUNT_CONFIRMATION_FAILED = 201;
-    public static final Integer ALREADY_LOGGED_IN = 202;
-    public static final Integer EXPIRED = 204;
-    public static final Integer BAD_CREDENTIALS = 205;
-    public static final Integer UNCONFIRMED_ACCOUNT = 206;
-    public static final Integer NAME_EXISTS = 207;
-    public static final Integer PASSWORD_RESET_FAILED = 208;
+    public static final int ACCOUNT_DEACTIVATED = 200;
+    public static final int ACCOUNT_CONFIRMATION_FAILED = 201;
+    public static final int ALREADY_LOGGED_IN = 202;
+    public static final int EXPIRED = 204;
+    public static final int BAD_CREDENTIALS = 205;
+    public static final int UNCONFIRMED_ACCOUNT = 206;
+    public static final int NAME_EXISTS = 207;
+    public static final int PASSWORD_RESET_FAILED = 208;
     // fixme: ?!
     @Deprecated
-    public static final Integer AUTHENTICATION_DENIED = 209;
+    public static final int AUTHENTICATION_DENIED = 209;
 
-    public static final Integer LOGIN_SUCCESSFUL = 210;
-    public static final Integer LOGIN_FAILED = 211;
-    public static final Integer LOGOUT_SUCCESSFUL = 212;
-    public static final Integer LOGOUT_FAILED = 213;
+    public static final int LOGIN_SUCCESSFUL = 210;
+    public static final int LOGIN_FAILED = 211;
+    public static final int LOGOUT_SUCCESSFUL = 212;
+    public static final int LOGOUT_FAILED = 213;
 
-    public static final Integer CLIENT_REGISTRATION_FAILURE = 214;
-    public static final Integer CLIENT_REMOVAL_FAILURE = 215;
-    public static final Integer CLIENT_AUTHORIZATION_FAILURE = 216;
+    public static final int CLIENT_REGISTRATION_FAILURE = 214;
+    public static final int CLIENT_REMOVAL_FAILURE = 215;
+    public static final int CLIENT_AUTHORIZATION_FAILURE = 216;
 
     /**
      * 500 status codes for access control related components (also policy rewrite)
      */
-    public static final Integer PERMISSION_DENIED = 401;
-    public static final Integer UNSUPPORTED_RESOURCE = 402;
-    public static final Integer UNSUPPORTED_FOUNDRY = 403;
-    public static final Integer UNSUPPORTED_CORPUS = 404;
-    public static final Integer UNSUPPORTED_LAYER = 405;
+    public static final int PERMISSION_DENIED = 401;
+    public static final int UNSUPPORTED_RESOURCE = 402;
+    public static final int UNSUPPORTED_FOUNDRY = 403;
+    public static final int UNSUPPORTED_CORPUS = 404;
+    public static final int UNSUPPORTED_LAYER = 405;
     // make a distinction between no and invalid vc?
-    public static final Integer UNSUPPORTED_COLLECTION = 406;
-    public static final Integer CORPUS_REWRITE = 407;
-    public static final Integer FOUNDRY_REWRITE = 408;
-    public static final Integer FOUNDRY_INJECTION = 409;
-    public static final Integer MISSING_ARGUMENTS = 410;
-    public static final Integer MISSING_VIRTUALCOLLECTION = 411;
-    public static final Integer MISSING_POLICY_TARGET = 412;
-    public static final Integer MISSING_POLICY_CONDITIONS = 413;
-    public static final Integer MISSING_POLICY_PERMISSION = 414;
-    public static final Integer RESOURCE_NOT_FOUND = 415;
+    public static final int UNSUPPORTED_COLLECTION = 406;
+    public static final int CORPUS_REWRITE = 407;
+    public static final int FOUNDRY_REWRITE = 408;
+    public static final int FOUNDRY_INJECTION = 409;
+    public static final int MISSING_ARGUMENTS = 410;
+    public static final int MISSING_VIRTUALCOLLECTION = 411;
+    public static final int MISSING_POLICY_TARGET = 412;
+    public static final int MISSING_POLICY_CONDITIONS = 413;
+    public static final int MISSING_POLICY_PERMISSION = 414;
+    public static final int RESOURCE_NOT_FOUND = 415;
 
     // todo: extend according to policy rewrite possible!
     // policy errors
-    public static final Integer POLICY_ERROR_DEFAULT = 500;
-    public static final Integer POLICY_CREATE_ERROR = 501;
-    public static final Integer NO_POLICIES = 502;
+    public static final int POLICY_ERROR_DEFAULT = 500;
+    public static final int POLICY_CREATE_ERROR = 501;
+    public static final int NO_POLICIES = 502;
 
     // database codes
-    public static final Integer DB_GET_FAILED = 601;
-    public static final Integer DB_INSERT_FAILED = 602;
-    public static final Integer DB_DELETE_FAILED = 603;
-    public static final Integer DB_UPDATE_FAILED = 604;
+    public static final int DB_GET_FAILED = 601;
+    public static final int DB_INSERT_FAILED = 602;
+    public static final int DB_DELETE_FAILED = 603;
+    public static final int DB_UPDATE_FAILED = 604;
 
-    public static final Integer DB_GET_SUCCESSFUL = 605;
-    public static final Integer DB_INSERT_SUCCESSFUL = 606;
-    public static final Integer DB_DELETE_SUCCESSFUL = 607;
-    public static final Integer DB_UPDATE_SUCCESSFUL = 608;
+    public static final int DB_GET_SUCCESSFUL = 605;
+    public static final int DB_INSERT_SUCCESSFUL = 606;
+    public static final int DB_DELETE_SUCCESSFUL = 607;
+    public static final int DB_UPDATE_SUCCESSFUL = 608;
 
     // service status codes
-    public static final Integer CREATE_ACCOUNT_SUCCESSFUL = 700;
-    public static final Integer CREATE_ACCOUNT_FAILED = 701;
-    public static final Integer DELETE_ACCOUNT_SUCCESSFUL = 702;
-    public static final Integer DELETE_ACCOUNT_FAILED = 703;
-    public static final Integer UPDATE_ACCOUNT_SUCCESSFUL = 704;
-    public static final Integer UPDATE_ACCOUNT_FAILED = 705;
+    public static final int CREATE_ACCOUNT_SUCCESSFUL = 700;
+    public static final int CREATE_ACCOUNT_FAILED = 701;
+    public static final int DELETE_ACCOUNT_SUCCESSFUL = 702;
+    public static final int DELETE_ACCOUNT_FAILED = 703;
+    public static final int UPDATE_ACCOUNT_SUCCESSFUL = 704;
+    public static final int UPDATE_ACCOUNT_FAILED = 705;
 
-    public static final Integer GET_ACCOUNT_SUCCESSFUL = 706;
-    public static final Integer GET_ACCOUNT_FAILED = 707;
+    public static final int GET_ACCOUNT_SUCCESSFUL = 706;
+    public static final int GET_ACCOUNT_FAILED = 707;
 
     /**
      * 300 status codes for query language and serialization
      */
 
-    public static final Integer NO_QUERY = 301;
+    public static final int NO_QUERY = 301;
 
 }
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 e87b62d..c5bf551 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
@@ -53,6 +53,7 @@
             user = this.jdbcTemplate.queryForObject(sql, namedParameters,
                     new RowMapperFactory.UserMapper());
         }catch (EmptyResultDataAccessException ae) {
+            ae.printStackTrace();
             jlog.error("No user found for name '{}'", username);
             throw new EmptyResultException(username);
         }catch (DataAccessException e) {
@@ -73,20 +74,21 @@
             np.addValue("alo", k.isAccountLocked());
             if (k.getPassword() != null)
                 np.addValue("ps", k.getPassword());
-            URIParam param = k.getField(URIParam.class);
-            if (param != null) {
-                np.addValue("frag", param.getUriFragment());
-                np.addValue("exp", new Date(param.getUriExpiration()));
-            }else {
-                np.addValue("frag", null);
-                np.addValue("exp", null);
-            }
+            //            URIParam param = k.getField(URIParam.class);
+            //            if (param != null) {
+            //                np.addValue("frag", param.getUriFragment());
+            //                np.addValue("exp", new Date(param.getUriExpiration()));
+            //            }else {
+            //                np.addValue("frag", null);
+            //                np.addValue("exp", null);
+            //            }
             np.addValue("id", k.getId());
 
             query = "UPDATE korap_users SET account_lock=:alo," +
-                    "account_link=:ali, password=:ps," +
-                    "uri_fragment=:frag," +
-                    "uri_expiration=:exp WHERE id=:id";
+                    "account_link=:ali, password=:ps "
+                    //                    "uri_fragment=:frag," +
+                    //                    "uri_expiration=:exp "
+                    + "WHERE id=:id";
         }else if (user instanceof ShibUser) {
             ShibUser s = (ShibUser) user;
             //todo:
@@ -138,6 +140,7 @@
             np.addValue("acr", System.currentTimeMillis());
             np.addValue("id", k.getId());
 
+            System.out.println("query map " + np.getValues());
             if (user.getId() != -1)
                 query = "INSERT INTO korap_users (id, username, account_lock, "
                         +
@@ -278,6 +281,7 @@
         }
     }
 
+    @Override
     public int size() {
         final String query = "SELECT COUNT(*) FROM korap_users;";
         return this.jdbcTemplate
diff --git a/src/main/java/de/ids_mannheim/korap/handlers/ResourceDao.java b/src/main/java/de/ids_mannheim/korap/handlers/ResourceDao.java
index 06c952f..0869236 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/ResourceDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/ResourceDao.java
@@ -116,7 +116,9 @@
             return (T) this.jdbcTemplate.queryForObject(sql, source,
                     new RowMapperFactory.ResourceMapper());
         }catch (DataAccessException e) {
-            e.printStackTrace();
+            if (e instanceof IncorrectResultSizeDataAccessException)
+                throw new KustvaktException(StatusCodes.ILLEGAL_ARGUMENT,
+                        "invalid request id given!", String.valueOf(id));
             return null;
         }
     }
diff --git a/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java b/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java
index 060578c..22c600c 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java
@@ -111,7 +111,7 @@
 
                 r.setFields(rs.getString("data"));
                 r.setDescription(rs.getString("description"));
-                r.setCreated(rs.getTimestamp("created").getTime());
+                r.setCreated(rs.getLong("created"));
                 r.setPath(rs.getString("name_path"));
                 r.setPersistentID(rs.getString("persistent_id"));
             }
diff --git a/src/main/java/de/ids_mannheim/korap/handlers/UserDetailsDao.java b/src/main/java/de/ids_mannheim/korap/handlers/UserDetailsDao.java
index e05386b..e301ff5 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/UserDetailsDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/UserDetailsDao.java
@@ -1,10 +1,13 @@
 package de.ids_mannheim.korap.handlers;
 
+import de.ids_mannheim.korap.exceptions.StatusCodes;
+import de.ids_mannheim.korap.exceptions.dbException;
 import de.ids_mannheim.korap.interfaces.db.PersistenceClient;
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.user.UserDetails;
 import org.springframework.dao.DataAccessException;
+import org.springframework.dao.EmptyResultDataAccessException;
 import org.springframework.jdbc.core.RowMapper;
 import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
 import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
@@ -60,7 +63,7 @@
     }
 
     @Override
-    public UserDetails get(Integer id) {
+    public UserDetails get(Integer id) throws dbException {
         String sql = "SELECT * FROM user_details WHERE id=:id;";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("id", id);
@@ -80,13 +83,16 @@
                         }
                     });
 
-        }catch (DataAccessException e) {
+        }catch (EmptyResultDataAccessException ex) {
             return null;
+        }catch (DataAccessException e) {
+            throw new dbException(-1, "userDetails",
+                    StatusCodes.REQUEST_INVALID, String.valueOf(id));
         }
     }
 
     @Override
-    public UserDetails get(User user) {
+    public UserDetails get(User user) throws dbException {
         String sql = "SELECT * FROM user_details WHERE user_id=:userid;";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("userid", user.getId());
@@ -105,10 +111,11 @@
                             return details;
                         }
                     });
-
-        }catch (DataAccessException e) {
-            e.printStackTrace();
+        }catch (EmptyResultDataAccessException ex) {
             return null;
+        }catch (DataAccessException e) {
+            throw new dbException(user.getId(), "userDetails",
+                    StatusCodes.REQUEST_INVALID);
         }
     }
 
diff --git a/src/main/java/de/ids_mannheim/korap/handlers/UserSettingsDao.java b/src/main/java/de/ids_mannheim/korap/handlers/UserSettingsDao.java
index d343dca..6b9300f 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/UserSettingsDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/UserSettingsDao.java
@@ -1,10 +1,13 @@
 package de.ids_mannheim.korap.handlers;
 
+import de.ids_mannheim.korap.exceptions.StatusCodes;
+import de.ids_mannheim.korap.exceptions.dbException;
 import de.ids_mannheim.korap.interfaces.db.PersistenceClient;
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.user.UserSettings;
 import org.springframework.dao.DataAccessException;
+import org.springframework.dao.EmptyResultDataAccessException;
 import org.springframework.jdbc.core.RowMapper;
 import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
 import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
@@ -25,6 +28,7 @@
     public UserSettingsDao(PersistenceClient client) {
         this.jdbcTemplate = (NamedParameterJdbcTemplate) client.getSource();
     }
+
     @Override
     public int store(UserSettings data) {
         String sql = "INSERT INTO user_settings (user_id, data) VALUES (:userid, :data);";
@@ -59,7 +63,7 @@
     }
 
     @Override
-    public UserSettings get(Integer id) {
+    public UserSettings get(Integer id) throws dbException {
         String sql = "SELECT * FROM user_settings WHERE id=:id;";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("id", id);
@@ -79,13 +83,16 @@
                         }
                     });
 
-        }catch (DataAccessException e) {
+        }catch (EmptyResultDataAccessException ex) {
             return null;
+        }catch (DataAccessException e) {
+            throw new dbException(-1, "userSettings",
+                    StatusCodes.REQUEST_INVALID, String.valueOf(id));
         }
     }
 
     @Override
-    public UserSettings get(User user) {
+    public UserSettings get(User user) throws dbException {
         String sql = "SELECT * FROM user_settings WHERE user_id=:userid;";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("userid", user.getId());
@@ -105,9 +112,11 @@
                         }
                     });
 
-        }catch (DataAccessException e) {
-            e.printStackTrace();
+        }catch (EmptyResultDataAccessException ex) {
             return null;
+        }catch (DataAccessException e) {
+            throw new dbException(-1, "userSettings",
+                    StatusCodes.REQUEST_INVALID);
         }
     }
 
diff --git a/src/main/java/de/ids_mannheim/korap/interfaces/db/EntityHandlerIface.java b/src/main/java/de/ids_mannheim/korap/interfaces/db/EntityHandlerIface.java
index c83f60d..932c069 100644
--- a/src/main/java/de/ids_mannheim/korap/interfaces/db/EntityHandlerIface.java
+++ b/src/main/java/de/ids_mannheim/korap/interfaces/db/EntityHandlerIface.java
@@ -26,4 +26,5 @@
     int activateAccount(String username, String uriToken)
             throws KustvaktException;
 
+    int size();
 }
diff --git a/src/main/java/de/ids_mannheim/korap/security/ac/PolicyBuilder.java b/src/main/java/de/ids_mannheim/korap/security/ac/PolicyBuilder.java
index 06af664..1922433 100644
--- a/src/main/java/de/ids_mannheim/korap/security/ac/PolicyBuilder.java
+++ b/src/main/java/de/ids_mannheim/korap/security/ac/PolicyBuilder.java
@@ -11,8 +11,6 @@
 import de.ids_mannheim.korap.security.SecurityPolicy;
 import de.ids_mannheim.korap.user.User;
 
-import java.util.Arrays;
-
 /**
  * @author hanl
  * @date 14/04/2014
@@ -130,15 +128,10 @@
         if (this.rel == null)
             this.rel = Relation.AND;
 
-        System.out.println("CREATING RESOURCES " + Arrays.asList(resources));
-        System.out.println("RESOURCES LENGTH " + resources.length);
         for (int idx = 0; idx < this.resources.length; idx++) {
             try {
-                System.out.println("ITERATING OVER ARRAY " + idx);
                 if (parents[idx] != null)
                     resources[idx].setParentID(parents[idx].getPersistentID());
-                System.out.println("RUNNING REGISTERING SERVICE ON RESOURCE "
-                        + resources[idx]);
                 SecurityManager manager = SecurityManager
                         .register(resources[idx], user);
 
diff --git a/src/main/java/de/ids_mannheim/korap/security/ac/PolicyDao.java b/src/main/java/de/ids_mannheim/korap/security/ac/PolicyDao.java
index 57c6fe2..12bee9f 100644
--- a/src/main/java/de/ids_mannheim/korap/security/ac/PolicyDao.java
+++ b/src/main/java/de/ids_mannheim/korap/security/ac/PolicyDao.java
@@ -602,10 +602,9 @@
         }
     }
 
-    private Integer createCondition(PolicyCondition condition, User user)
+    private void createCondition(PolicyCondition condition, User user)
             throws KustvaktException {
         MapSqlParameterSource param = new MapSqlParameterSource();
-        KeyHolder key = new GeneratedKeyHolder();
         param.addValue("name", condition.getSpecifier());
         param.addValue("ex", condition.getFlags().get(Attributes.EXPORT));
         param.addValue("qo", condition.getFlags().get(Attributes.QUERY_ONLY));
@@ -615,8 +614,7 @@
         try {
             this.jdbcTemplate
                     .update("INSERT INTO group_store (name, sym_use, export, commercial) "
-                            + "VALUES (:name, :sy, :ex, :com);", param, key);
-            return key.getKey().intValue();
+                            + "VALUES (:name, :sy, :ex, :com);", param);
         }catch (DataAccessException e) {
             jlog.error("Operation (INSERT) not possible for '{}'",
                     condition.toString());
diff --git a/src/main/java/de/ids_mannheim/korap/security/ac/SecurityRowMappers.java b/src/main/java/de/ids_mannheim/korap/security/ac/SecurityRowMappers.java
index 0b33e68..4dedb30 100644
--- a/src/main/java/de/ids_mannheim/korap/security/ac/SecurityRowMappers.java
+++ b/src/main/java/de/ids_mannheim/korap/security/ac/SecurityRowMappers.java
@@ -14,7 +14,6 @@
 
 import java.sql.ResultSet;
 import java.sql.SQLException;
-import java.sql.Timestamp;
 import java.util.*;
 
 /**
@@ -34,12 +33,12 @@
 
             PolicyContext context = new PolicyContext();
             context.setIPMask(rs.getString("iprange"));
-            Timestamp date = rs.getTimestamp("enable");
-            Timestamp date2 = rs.getTimestamp("expire");
-            if (date != null)
-                context.setEnableTime(date.getTime());
-            if (date2 != null)
-                context.setExpirationTime(date2.getTime());
+            long enable = rs.getLong("enable");
+            long expire = rs.getLong("expire");
+            if (enable != -1)
+                context.setEnableTime(enable);
+            if (expire != -1)
+                context.setExpirationTime(expire);
             //            context.addFlag("export", rs.getBoolean("export"));
             //            context.addFlag("sym_use", rs.getInt("sym_use"));
             p.setContext(context);
diff --git a/src/main/java/de/ids_mannheim/korap/security/auth/BasicHttpAuth.java b/src/main/java/de/ids_mannheim/korap/security/auth/BasicHttpAuth.java
index e97ea53..aa7b28b 100644
--- a/src/main/java/de/ids_mannheim/korap/security/auth/BasicHttpAuth.java
+++ b/src/main/java/de/ids_mannheim/korap/security/auth/BasicHttpAuth.java
@@ -50,15 +50,16 @@
         EncryptionIface crypto = BeanConfiguration.getBeans().getEncryption();
         EntityHandlerIface dao = BeanConfiguration.getBeans()
                 .getUserDBHandler();
-        TokenContext c = new TokenContext();
         String[] values = decode(authToken);
         if (values != null) {
+            TokenContext c = new TokenContext();
             User user = dao.getAccount(values[0]);
             if (user instanceof KorAPUser) {
                 boolean check = crypto
                         .checkHash(values[1], ((KorAPUser) user).getPassword());
+
                 if (!check)
-                    return c;
+                    return null;
             }
             c.setUsername(values[0]);
             c.setTokenType(Attributes.BASIC_AUTHENTICATION);
@@ -68,8 +69,9 @@
             //            fixme: you can make queries, but user sensitive data is off limits?!
             c.addContextParameter(Attributes.SCOPES,
                     Scopes.Scope.search.toString());
+            return c;
         }
-        return c;
+        return null;
     }
 
     // not supported!
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 adcb263..70b190b 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
@@ -89,14 +89,9 @@
             Map map = (Map) e.getObjectValue();
             user = User.UserFactory.toUser(map);
         }else {
-            try {
-                user = entHandler.getAccount(username);
-                user_cache.put(new Element(key, user.toCache()));
-                // todo: not valid. for the duration of the session, the host should not change!
-            }catch (EmptyResultException e1) {
-                // do nothing
-                return null;
-            }
+            user = entHandler.getAccount(username);
+            user_cache.put(new Element(key, user.toCache()));
+            // todo: not valid. for the duration of the session, the host should not change!
         }
         //todo:
         //        user.addField(Attributes.HOST, context.getHostAddress());
@@ -486,8 +481,9 @@
         }
 
         KorAPUser user = User.UserFactory.getUser(username);
+        user.setAccountLocked(confirmation_required);
+
         if (confirmation_required) {
-            user.setAccountLocked(true);
             URIParam param = new URIParam(crypto.createToken(),
                     TimeUtils.plusSeconds(config.getExpiration()).getMillis());
             user.addField(param);
@@ -679,7 +675,12 @@
 
         try {
             UserDataDbIface<T> dao = UserdataFactory.getDaoInstance(clazz);
-            return dao.get(user);
+            T data = dao.get(user);
+            if (data == null)
+                throw new WrappedException(user.getId(),
+                        StatusCodes.EMPTY_RESULTS, clazz.getSimpleName());
+
+            return data;
         }catch (KustvaktException e) {
             jlog.error("Error ", e);
             throw new WrappedException(e, StatusCodes.GET_ACCOUNT_FAILED);
diff --git a/src/main/java/de/ids_mannheim/korap/security/auth/SessionFactory.java b/src/main/java/de/ids_mannheim/korap/security/auth/SessionFactory.java
index 426d594..8004e31 100644
--- a/src/main/java/de/ids_mannheim/korap/security/auth/SessionFactory.java
+++ b/src/main/java/de/ids_mannheim/korap/security/auth/SessionFactory.java
@@ -25,6 +25,7 @@
  *
  * @author hanl
  */
+//todo: use simple ehcache!
 public class SessionFactory implements Runnable {
 
     private static Logger jlog = LoggerFactory.getLogger(SessionFactory.class);
@@ -48,10 +49,8 @@
     public boolean hasSession(TokenContext context) {
         if (context.getUsername().equalsIgnoreCase(DemoUser.DEMOUSER_NAME))
             return false;
-        if (loggedInRecord.containsKey(context.getUsername()) && !loggedInRecord
-                .get(context.getUsername()).isEmpty())
-            return true;
-        return false;
+        return loggedInRecord.containsKey(context.getUsername())
+                && !loggedInRecord.get(context.getUsername()).isEmpty();
     }
 
     @Cacheable("session")
@@ -118,8 +117,9 @@
      */
     private boolean isUserSessionValid(String token) {
         if (timeCheck.containsKey(token)) {
-            if (TimeUtils.plusSeconds(timeCheck.get(token).getMillis(),
-                    inactive).isAfterNow()) {
+            if (TimeUtils
+                    .plusSeconds(timeCheck.get(token).getMillis(), inactive)
+                    .isAfterNow()) {
                 jlog.debug("user has session");
                 return true;
             }else
@@ -144,19 +144,10 @@
                 removeSession(entry.getKey());
             }
         }
+        // fixme: not doing anything!
         if (inactive.size() > 0)
             jlog.debug("removing inactive user session for users '{}' ",
                     inactive);
-
-        //        keys:
-        //        for (String key : failedLogins.getKeySet()) {
-        //            DateTime d = new DateTime(failedLogins.get(key).get(1));
-        //            if (d.isBeforeNow()) {
-        //                failedLogins.remove(key);
-        //                jlog.info("removed failed login counts due to expiration for user {}", key);
-        //                continue keys;
-        //            }
-        //        }
     }
 
     /**
@@ -165,7 +156,7 @@
     @Override
     public void run() {
         timeoutMaintenance();
-        jlog.debug("logged users: {}", loggedInRecord.toString());
-
+        if (loggedInRecord.size() > 0)
+            jlog.debug("logged users: {}", loggedInRecord.toString());
     }
 }
diff --git a/src/main/java/de/ids_mannheim/korap/user/DemoUser.java b/src/main/java/de/ids_mannheim/korap/user/DemoUser.java
index 22da0e8..b1ceef1 100644
--- a/src/main/java/de/ids_mannheim/korap/user/DemoUser.java
+++ b/src/main/java/de/ids_mannheim/korap/user/DemoUser.java
@@ -18,7 +18,6 @@
     protected DemoUser() {
         super(DEMOUSER_NAME, 2);
         this.setAccountCreation(ACCOUNT_CREATED);
-//        this.setQueries(UserQuery.demoUserQueries());
     }
 
     protected User clone() {
diff --git a/src/main/java/de/ids_mannheim/korap/user/TokenContext.java b/src/main/java/de/ids_mannheim/korap/user/TokenContext.java
index a31beab..bdc2d36 100644
--- a/src/main/java/de/ids_mannheim/korap/user/TokenContext.java
+++ b/src/main/java/de/ids_mannheim/korap/user/TokenContext.java
@@ -109,6 +109,12 @@
         return c;
     }
 
+    public boolean isValid() {
+        return (this.username != null && !this.username.isEmpty()) && (
+                this.token != null && !this.token.isEmpty()) && (
+                this.tokenType != null && !this.tokenType.isEmpty());
+    }
+
     public String getToken() {
         return token;
     }
diff --git a/src/main/java/de/ids_mannheim/korap/user/User.java b/src/main/java/de/ids_mannheim/korap/user/User.java
index 95330b1..79df7cb 100644
--- a/src/main/java/de/ids_mannheim/korap/user/User.java
+++ b/src/main/java/de/ids_mannheim/korap/user/User.java
@@ -177,6 +177,24 @@
             return u;
         }
 
+        public static KorAPUser toKorAPUser(Map<String, Object> map) {
+            KorAPUser user = UserFactory
+                    .getUser((String) map.get(Attributes.USERNAME));
+            user.setPassword((String) map.get(Attributes.PASSWORD));
+            int id = map.get(Attributes.ID) == null ?
+                    -1 :
+                    (int) map.get(Attributes.ID);
+            if (id != -1)
+                user.setId(id);
+            long cr = map.get(Attributes.ACCOUNT_CREATION) == null ?
+                    -1 :
+                    (long) map.get(Attributes.ACCOUNT_CREATION);
+            if (cr != -1)
+                user.setAccountCreation(
+                        (Long) map.get(Attributes.ACCOUNT_CREATION));
+            return user;
+        }
+
         public static User toUser(Map<String, Object> map) {
             KustvaktMap kmap = new KustvaktMap(map);
             int type = map.get(Attributes.TYPE) == null ?
@@ -184,14 +202,19 @@
                     (Integer) kmap.get(Attributes.TYPE, Integer.class);
             User user;
             long created = -1;
+            int id = kmap.get(Attributes.ID, Integer.class) == null ?
+                    -1 :
+                    (Integer) kmap.get(Attributes.ID, Integer.class);
+
             if (map.get(Attributes.ACCOUNT_CREATION) != null)
                 created = DateTime.parse(kmap.get(Attributes.ACCOUNT_CREATION))
                         .getMillis();
             switch (type) {
                 case 0:
                     user = UserFactory.getUser(kmap.get(Attributes.USERNAME));
-                    user.setId(
-                            (Integer) kmap.get(Attributes.ID, Integer.class));
+                    if (id != -1)
+                        user.setId((Integer) kmap
+                                .get(Attributes.ID, Integer.class));
                     user.setAccountLocked(
                             map.get(Attributes.ACCOUNTLOCK) == null ?
                                     false :
@@ -200,8 +223,7 @@
                     user.setAccountCreation(created);
                     break;
                 default:
-                    user = UserFactory.getDemoUser(
-                            (Integer) kmap.get(Attributes.ID, Integer.class));
+                    user = UserFactory.getDemoUser();
                     user.setAccountCreation(created);
             }
             return user;
diff --git a/src/main/java/de/ids_mannheim/korap/user/UserdataFactory.java b/src/main/java/de/ids_mannheim/korap/user/UserdataFactory.java
index 353915f..85e8046 100644
--- a/src/main/java/de/ids_mannheim/korap/user/UserdataFactory.java
+++ b/src/main/java/de/ids_mannheim/korap/user/UserdataFactory.java
@@ -59,7 +59,7 @@
                 }
             }
             throw new KustvaktException(StatusCodes.NOT_SUPPORTED,
-                    "No database class found for type " + data.getSimpleName());
+                    "No database handler found for type " + data.getSimpleName());
         }else
             return instances.get(data);
     }
diff --git a/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java b/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java
index 8bdfb7d..2a8e430 100644
--- a/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java
+++ b/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java
@@ -4,6 +4,7 @@
 import com.sun.jersey.api.core.ResourceConfig;
 import com.sun.jersey.spi.container.servlet.ServletContainer;
 import de.ids_mannheim.korap.config.BeanConfiguration;
+import de.ids_mannheim.korap.config.KustvaktCacheManager;
 import de.ids_mannheim.korap.config.KustvaktClassLoader;
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
@@ -39,6 +40,8 @@
         else
             BeanConfiguration.loadClasspathContext();
 
+        KustvaktCacheManager.init();
+
         kargs.setRootPackages(
                 new String[] { "de.ids_mannheim.korap.web.service.light" });
 
@@ -107,6 +110,7 @@
                     iface.load();
                 }catch (KustvaktException e) {
                     // don't do anything!
+                    System.out.println("An error occurred! " + e);
                 }
             }
         }
diff --git a/src/main/java/de/ids_mannheim/korap/web/filter/AuthFilter.java b/src/main/java/de/ids_mannheim/korap/web/filter/AuthFilter.java
index 60a2891..cb419fd 100644
--- a/src/main/java/de/ids_mannheim/korap/web/filter/AuthFilter.java
+++ b/src/main/java/de/ids_mannheim/korap/web/filter/AuthFilter.java
@@ -40,11 +40,10 @@
                 context = userController
                         .getTokenStatus(authentication, host, ua);
             }catch (KustvaktException e) {
-                throw KustvaktResponseHandler.throwit(e);
+                throw KustvaktResponseHandler.throwAuthenticationException();
             }
-
             // fixme: give reason why access is not granted?
-            if (context != null && (
+            if (context != null && context.isValid() && (
                     (context.isSecureRequired() && request.isSecure())
                             | !context.isSecureRequired()))
                 request.setSecurityContext(new KorAPContext(context));
diff --git a/src/main/java/de/ids_mannheim/korap/web/service/full/ResourceService.java b/src/main/java/de/ids_mannheim/korap/web/service/full/ResourceService.java
index 7a6b249..d9fec47 100644
--- a/src/main/java/de/ids_mannheim/korap/web/service/full/ResourceService.java
+++ b/src/main/java/de/ids_mannheim/korap/web/service/full/ResourceService.java
@@ -29,6 +29,7 @@
 import de.ids_mannheim.korap.web.SearchKrill;
 import de.ids_mannheim.korap.web.TRACE;
 import de.ids_mannheim.korap.web.filter.AuthFilter;
+import de.ids_mannheim.korap.web.filter.BlockingFilter;
 import de.ids_mannheim.korap.web.filter.DefaultFilter;
 import de.ids_mannheim.korap.web.filter.PiwikFilter;
 import de.ids_mannheim.korap.web.utils.KustvaktResponseHandler;
@@ -44,7 +45,8 @@
  * @date 29/01/2014
  */
 @Path(KustvaktServer.API_VERSION + "/")
-@ResourceFilters({ AuthFilter.class, DefaultFilter.class, PiwikFilter.class })
+@ResourceFilters({ AuthFilter.class, DefaultFilter.class, PiwikFilter.class,
+        BlockingFilter.class })
 @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
 public class ResourceService {
 
@@ -869,8 +871,8 @@
             CollectionQueryBuilder3 cquery = new CollectionQueryBuilder3();
             if (reference != null && !reference.equals("null")) {
                 try {
-                    cquery.addQuery(
-                            (String) resourceHandler.findbyStrId(reference, user,
+                    cquery.addQuery((String) resourceHandler
+                            .findbyStrId(reference, user,
                                     VirtualCollection.class).getData());
                 }catch (KustvaktException e) {
                     throw KustvaktResponseHandler.throwit(e);
diff --git a/src/main/java/de/ids_mannheim/korap/web/service/full/UserService.java b/src/main/java/de/ids_mannheim/korap/web/service/full/UserService.java
index b7a5e5e..dc65cc7 100644
--- a/src/main/java/de/ids_mannheim/korap/web/service/full/UserService.java
+++ b/src/main/java/de/ids_mannheim/korap/web/service/full/UserService.java
@@ -101,8 +101,8 @@
     @POST
     @Path("update")
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
-    @ResourceFilters({ AuthFilter.class, DefaultFilter.class,
-            PiwikFilter.class })
+    @ResourceFilters({ AuthFilter.class, DefaultFilter.class, PiwikFilter.class,
+            BlockingFilter.class })
     public Response updateAccount(@Context SecurityContext ctx, String json) {
         TokenContext context = (TokenContext) ctx.getUserPrincipal();
         try {
@@ -206,7 +206,7 @@
     @GET
     @Path("info")
     @ResourceFilters({ AuthFilter.class, DefaultFilter.class, PiwikFilter.class,
-            BlockingFilter.class })
+            BlockingFilter.class, BlockingFilter.class })
     public Response getStatus(@Context SecurityContext context,
             @QueryParam("scopes") String scopes) {
         TokenContext ctx = (TokenContext) context.getUserPrincipal();
@@ -228,8 +228,8 @@
 
     @GET
     @Path("settings")
-    @ResourceFilters({ AuthFilter.class, DefaultFilter.class,
-            PiwikFilter.class })
+    @ResourceFilters({ AuthFilter.class, DefaultFilter.class, PiwikFilter.class,
+            BlockingFilter.class })
     public Response getUserSettings(@Context SecurityContext context,
             @Context Locale locale) {
         TokenContext ctx = (TokenContext) context.getUserPrincipal();
@@ -250,8 +250,8 @@
     @POST
     @Path("settings")
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
-    @ResourceFilters({ AuthFilter.class, DefaultFilter.class,
-            PiwikFilter.class })
+    @ResourceFilters({ AuthFilter.class, DefaultFilter.class, PiwikFilter.class,
+            BlockingFilter.class })
     public Response updateSettings(@Context SecurityContext context,
             @Context Locale locale, MultivaluedMap form) {
         TokenContext ctx = (TokenContext) context.getUserPrincipal();
@@ -284,8 +284,8 @@
 
     @GET
     @Path("details")
-    @ResourceFilters({ AuthFilter.class, DefaultFilter.class,
-            PiwikFilter.class })
+    @ResourceFilters({ AuthFilter.class, DefaultFilter.class, PiwikFilter.class,
+            BlockingFilter.class })
     public Response getDetails(@Context SecurityContext context,
             @Context Locale locale) {
         TokenContext ctx = (TokenContext) context.getUserPrincipal();
@@ -299,14 +299,15 @@
             jlog.error("Exception encountered!", e);
             throw KustvaktResponseHandler.throwit(e);
         }
-        return Response.ok(result).build();
+//        return Response.ok(result).build();
+        return null;
     }
 
     @POST
     @Path("details")
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
-    @ResourceFilters({ AuthFilter.class, DefaultFilter.class,
-            PiwikFilter.class })
+    @ResourceFilters({ AuthFilter.class, DefaultFilter.class, PiwikFilter.class,
+            BlockingFilter.class })
     public Response updateDetails(@Context SecurityContext context,
             @Context Locale locale, MultivaluedMap form) {
         TokenContext ctx = (TokenContext) context.getUserPrincipal();
@@ -336,8 +337,8 @@
     @POST
     @Path("queries")
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
-    @ResourceFilters({ AuthFilter.class, DefaultFilter.class,
-            PiwikFilter.class })
+    @ResourceFilters({ AuthFilter.class, DefaultFilter.class, PiwikFilter.class,
+            BlockingFilter.class })
     public Response updateQueries(@Context SecurityContext context,
             String json) {
         TokenContext ctx = (TokenContext) context.getUserPrincipal();
@@ -387,8 +388,8 @@
     }
 
     @DELETE
-    @ResourceFilters({ AuthFilter.class, DefaultFilter.class,
-            PiwikFilter.class })
+    @ResourceFilters({ AuthFilter.class, DefaultFilter.class, PiwikFilter.class,
+            BlockingFilter.class })
     public Response deleteUser(@Context SecurityContext context) {
         TokenContext ctx = (TokenContext) context.getUserPrincipal();
         try {
@@ -405,8 +406,8 @@
 
     @GET
     @Path("queries")
-    @ResourceFilters({ AuthFilter.class, DefaultFilter.class,
-            PiwikFilter.class })
+    @ResourceFilters({ AuthFilter.class, DefaultFilter.class, PiwikFilter.class,
+            BlockingFilter.class })
     public Response getQueries(@Context SecurityContext context,
             @Context Locale locale) {
         TokenContext ctx = (TokenContext) context.getUserPrincipal();
diff --git a/src/main/java/de/ids_mannheim/korap/web/utils/KustvaktResponseHandler.java b/src/main/java/de/ids_mannheim/korap/web/utils/KustvaktResponseHandler.java
index 89ad245..80cd425 100644
--- a/src/main/java/de/ids_mannheim/korap/web/utils/KustvaktResponseHandler.java
+++ b/src/main/java/de/ids_mannheim/korap/web/utils/KustvaktResponseHandler.java
@@ -32,19 +32,19 @@
     }
 
     public static WebApplicationException throwit(KustvaktException e) {
-        return new WebApplicationException(
-                Response.status(Response.Status.BAD_REQUEST)
-                        .entity(buildNotification(e)).build());
+        Response s = Response.status(getStatus(e.getStatusCode()))
+                .entity(buildNotification(e)).build();
+        return new WebApplicationException(s);
     }
 
     public static WebApplicationException throwit(int code) {
-        return new WebApplicationException(Response.status(Response.Status.OK)
+        return new WebApplicationException(Response.status(getStatus(code))
                 .entity(buildNotification(code, "", "")).build());
     }
 
     public static WebApplicationException throwit(int code, String message,
             String entity) {
-        return new WebApplicationException(Response.status(Response.Status.OK)
+        return new WebApplicationException(Response.status(getStatus(code))
                 .entity(buildNotification(code, message, entity)).build());
     }
 
@@ -62,12 +62,24 @@
     }
 
     public static WebApplicationException throwAuthenticationException() {
-        KustvaktException e = new KustvaktException(
-                StatusCodes.BAD_CREDENTIALS);
         return new WebApplicationException(
                 Response.status(Response.Status.UNAUTHORIZED)
                         .header(HttpHeaders.WWW_AUTHENTICATE,
                                 "Basic realm=Kustvakt Authentication Service")
-                        .entity(buildNotification(e)).build());
+                        .entity(buildNotification(StatusCodes.BAD_CREDENTIALS,
+                                "Unauthorized access", "")).build());
+    }
+
+    private static Response.Status getStatus(int code) {
+        Response.Status status = Response.Status.BAD_REQUEST;
+        switch (code) {
+            case StatusCodes.EMPTY_RESULTS:
+                status = Response.Status.NO_CONTENT;
+                break;
+            case StatusCodes.ILLEGAL_ARGUMENT:
+                status = Response.Status.NOT_ACCEPTABLE;
+                break;
+        }
+        return status;
     }
 }
diff --git a/src/main/resources/db/mysql/V0.1__userdatabase.sql b/src/main/resources/db/mysql/V0.1__userdatabase.sql
index 6444651..cfe31a1 100644
--- a/src/main/resources/db/mysql/V0.1__userdatabase.sql
+++ b/src/main/resources/db/mysql/V0.1__userdatabase.sql
@@ -23,53 +23,17 @@
     account_link VARCHAR(100)
 );
 
+
 CREATE TABLE IF NOT EXISTS user_details (
-    Id INTEGER PRIMARY KEY AUTO_INCREMENT,
-    user_id INTEGER NOT NULL UNIQUE,
-    firstName VARCHAR(100),
-    lastName VARCHAR(100),
-    gender VARCHAR(100),
-    phone VARCHAR(100),
-    institution VARCHAR(100),
-    email VARCHAR(100),
-    address VARCHAR(100),
-    country VARCHAR(100),
-    privateUsage BOOLEAN,
-    foreign key (user_id)
-    references korap_users (id)
-    on delete cascade
+id INTEGER PRIMARY KEY AUTO_INCREMENT,
+user_id INTEGER UNIQUE NOT NULL,
+data BLOB NOT NULL
 );
 
 CREATE TABLE IF NOT EXISTS user_settings (
-    Id INTEGER PRIMARY KEY AUTO_INCREMENT,
-    user_id INTEGER NOT NULL UNIQUE,
-    fileNameForExport VARCHAR(100),
-    itemForSimpleAnnotation INTEGER,
-    leftContextItemForExport VARCHAR(100),
-    leftContextSizeForExport INTEGER,
-    locale VARCHAR(100),
-    leftContextItem VARCHAR(100),
-    leftContextSize INTEGER,
-    rightContextItem VARCHAR(100),
-    rightContextItemForExport VARCHAR(100),
-    rightContextSize INTEGER,
-    rightContextSizeForExport INTEGER,
-    selectedCollection VARCHAR(100),
-    queryLanguage VARCHAR(100),
-    pageLength INTEGER,
-    metadataQueryExpertModus BOOLEAN,
-    searchSettingsTab INTEGER,
-    selectedGraphType INTEGER,
-    selectedSortType VARCHAR(100),
-    selectedViewForSearchResults VARCHAR(100),
-    POSFoundry VARCHAR(100),
-    lemmaFoundry VARCHAR(100),
-    constFoundry VARCHAR(100),
-    relFoundry VARCHAR(100),
-    collectData BOOLEAN,
-    foreign key (user_id)
-    references korap_users (id)
-    on delete cascade
+id INTEGER PRIMARY KEY AUTO_INCREMENT,
+user_id INTEGER UNIQUE NOT NULL,
+data BLOB NOT NULL
 );
 
 -- deprecated
diff --git a/src/main/resources/db/mysql/V0.2__resourcesdatabase.sql b/src/main/resources/db/mysql/V0.2__resourcesdatabase.sql
index 01b8c26..cc2afa3 100644
--- a/src/main/resources/db/mysql/V0.2__resourcesdatabase.sql
+++ b/src/main/resources/db/mysql/V0.2__resourcesdatabase.sql
@@ -5,7 +5,8 @@
 name VARCHAR(100),
 description VARCHAR(300),
 parent_id Integer unsigned null,
-created BIGINT NOT NULL,
+created BIGINT null,
+data BLOB,
 type INTEGER NOT NULL,
 creator INTEGER NOT NULL
 );
@@ -24,7 +25,7 @@
 on delete cascade
 );
 
-
+-- deprecated
 CREATE TABLE IF NOT EXISTS user_queries (
     id INTEGER PRIMARY KEY,
     queryLanguage VARCHAR(100),
diff --git a/src/main/resources/db/mysql/V0.3__securitydatabase.sql b/src/main/resources/db/mysql/V0.3__securitydatabase.sql
index b7d826b..e74b114 100644
--- a/src/main/resources/db/mysql/V0.3__securitydatabase.sql
+++ b/src/main/resources/db/mysql/V0.3__securitydatabase.sql
@@ -5,8 +5,8 @@
     created TIMESTAMP,
     creator INTEGER NOT NULL,
     posix SMALLINT NOT NULL,
-    expire TIMESTAMP NULL,
-    enable TIMESTAMP NULL,
+    expire BIGINT NULL,
+    enable BIGINT NULL,
     iprange VARCHAR(200)
 );
 
diff --git a/src/main/resources/db/sqlite/V1__Initial_version.sql b/src/main/resources/db/sqlite/V1__Initial_version.sql
index 69fd635..46eff5e 100644
--- a/src/main/resources/db/sqlite/V1__Initial_version.sql
+++ b/src/main/resources/db/sqlite/V1__Initial_version.sql
@@ -45,19 +45,6 @@
 on delete cascade
 );
 
-CREATE TABLE IF NOT EXISTS coll_store (
-id INTEGER PRIMARY KEY AUTOINCREMENT,
-persistent_id VARCHAR(150) UNIQUE,
-name VARCHAR(150),
-description VARCHAR(200),
-query VARCHAR(500),
-created BIGINT NOT NULL,
-user_id INTEGER,
-foreign key(user_id)
-references korap_users(id)
-on delete cascade
-);
-
 CREATE TABLE IF NOT EXISTS audit_records (
 aud_id INTEGER PRIMARY KEY AUTOINCREMENT,
 aud_category VARCHAR(100),
@@ -161,7 +148,7 @@
 name VARCHAR(100),
 description VARCHAR(300),
 parent_id INTEGER unsigned null,
-created TIMESTAMP default current_timestamp,
+created BIGINT null,
 data BLOB,
 type INTEGER NOT NULL,
 creator INTEGER NOT NULL
diff --git a/src/main/resources/default-config.xml b/src/main/resources/default-config.xml
index cb62910..89f4bb9 100644
--- a/src/main/resources/default-config.xml
+++ b/src/main/resources/default-config.xml
@@ -10,18 +10,14 @@
                             http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
                             http://www.springframework.org/schema/tx
                             http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
-
-
                             http://www.springframework.org/schema/aop
                             http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
                             http://www.springframework.org/schema/cache
                             http://www.springframework.org/schema/cache/spring-cache-4.0.xsd
-
-
                             http://www.springframework.org/schema/util
                             http://www.springframework.org/schema/util/spring-util-4.0.xsd">
 
-    <cache:annotation-driven/>
+    <!--<cache:annotation-driven/>-->
 
     <bean id="props"
           class="org.springframework.beans.factory.config.PropertiesFactoryBean">
@@ -45,14 +41,14 @@
         </property>
     </bean>
 
-    <bean id='cacheManager'
-          class='org.springframework.cache.ehcache.EhCacheCacheManager'
-          p:cacheManager-ref='ehcache'/>
+    <!--<bean id='cacheManager'-->
+          <!--class='org.springframework.cache.ehcache.EhCacheCacheManager'-->
+          <!--p:cacheManager-ref='ehcache'/>-->
 
-    <bean id='ehcache'
-          class='org.springframework.cache.ehcache.EhCacheManagerFactoryBean'
-          p:configLocation='classpath:ehcache.xml'
-          p:shared='true'/>
+    <!--<bean id='ehcache'-->
+          <!--class='org.springframework.cache.ehcache.EhCacheManagerFactoryBean'-->
+          <!--p:configLocation='classpath:ehcache.xml'-->
+          <!--p:shared='true'/>-->
 
     <!-- props are injected from default-config.xml -->
     <bean id="kustvakt_config"
diff --git a/src/main/resources/ehcache.xml b/src/main/resources/ehcache.xml
index 4259339..1bbb213 100644
--- a/src/main/resources/ehcache.xml
+++ b/src/main/resources/ehcache.xml
@@ -17,20 +17,25 @@
            maxEntriesLocalHeap="50"
            overflowToDisk='false'/>
     <cache name='id_tokens'
-           timeToIdleSeconds="172800"
            eternal='true'
            maxElementsOnDisk="10000000"
            memoryStoreEvictionPolicy="LRU"
            maxEntriesLocalHeap="50"
            overflowToDisk='true'/>
     <cache name='id_tokens_inv'
-           timeToIdleSeconds="322800"
            eternal='true'
            maxElementsOnDisk="10000000"
            memoryStoreEvictionPolicy="LRU"
            maxEntriesLocalHeap="50"
            overflowToDisk='true'/>
 
+    <cache name='auth_sessions'
+           timeToIdleSeconds="172800"
+           eternal='false'
+           memoryStoreEvictionPolicy="LRU"
+           maxEntriesLocalHeap="100"
+           overflowToDisk='false'/>
+
     <cache name='auth_codes'
            timeToIdleSeconds="600"
            eternal='false'
diff --git a/src/test/java/UserdataTest.java b/src/test/java/UserdataTest.java
index c3cc6b8..e5b598f 100644
--- a/src/test/java/UserdataTest.java
+++ b/src/test/java/UserdataTest.java
@@ -1,5 +1,6 @@
 import de.ids_mannheim.korap.config.BeanConfiguration;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.exceptions.dbException;
 import de.ids_mannheim.korap.handlers.UserDetailsDao;
 import de.ids_mannheim.korap.handlers.UserSettingsDao;
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
@@ -47,7 +48,7 @@
     }
 
     @Test
-    public void testDataGet() {
+    public void testDataGet() throws dbException {
         User user = new KorAPUser();
         user.setId(1);
         UserDetailsDao dao = new UserDetailsDao(
diff --git a/src/test/java/de/ids_mannheim/korap/config/TestHelper.java b/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
index c1e2cd1..2a685a8 100644
--- a/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
+++ b/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
@@ -10,6 +10,8 @@
 import org.springframework.jdbc.core.RowCallbackHandler;
 import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
 
+import java.io.UnsupportedEncodingException;
+import java.security.NoSuchAlgorithmException;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.*;
@@ -25,9 +27,9 @@
     private static final String[] credentials = new String[] { "test1",
             "testPass2015" };
 
-    public static boolean setupUser() {
+    public static boolean setupAccount() {
         boolean r = BeanConfiguration.hasContext();
-        if (r) {
+        if (r && BeanConfiguration.getBeans().getUserDBHandler().size() == 0) {
             EntityHandlerIface dao = BeanConfiguration.getBeans()
                     .getUserDBHandler();
             Map m = new HashMap<>();
@@ -45,8 +47,37 @@
                         .createUserAccount(m, false);
             }catch (KustvaktException e) {
                 // do nothing
-                System.out.println("THE EXCEPTION...");
-                e.printStackTrace();
+                Assert.assertNull("Test user could not be set up", true);
+                return false;
+            }
+        }
+        return r;
+    }
+
+    public static boolean setupSimpleAccount() {
+        boolean r = BeanConfiguration.hasContext();
+        if (r && BeanConfiguration.getBeans().getUserDBHandler().size() == 0) {
+            EntityHandlerIface dao = BeanConfiguration.getBeans()
+                    .getUserDBHandler();
+            Map m = new HashMap<>();
+            m.put(Attributes.USERNAME, credentials[0]);
+
+            try {
+                String hash = BeanConfiguration.getBeans().getEncryption()
+                        .produceSecureHash(credentials[1]);
+                m.put(Attributes.PASSWORD, hash);
+            }catch (NoSuchAlgorithmException | UnsupportedEncodingException | KustvaktException e) {
+
+            }
+            Assert.assertNotNull("userdatabase handler must not be null", dao);
+
+            try {
+                int i = dao.createAccount(User.UserFactory.toKorAPUser(m));
+                assert BeanConfiguration.getBeans().getUserDBHandler()
+                        .getAccount(credentials[0]) != null;
+                assert i == 1;
+            }catch (KustvaktException e) {
+                // do nothing
                 Assert.assertNull("Test user could not be set up", true);
                 return false;
             }
@@ -80,7 +111,18 @@
         return r;
     }
 
-    public static boolean truncateAllUsers() {
+    public static void drop() {
+        if (BeanConfiguration.hasContext()) {
+            PersistenceClient cl = BeanConfiguration.getBeans()
+                    .getPersistenceClient();
+            String sql = "drop database " + cl.getDatabase() + ";";
+            NamedParameterJdbcTemplate jdbc = (NamedParameterJdbcTemplate) cl
+                    .getSource();
+            jdbc.update(sql, new HashMap<String, Object>());
+        }
+    }
+
+    public static boolean truncateAll() {
         boolean r = BeanConfiguration.hasContext();
         if (r) {
             String sql = "SELECT Concat('TRUNCATE TABLE ', TABLE_NAME) FROM INFORMATION_SCHEMA.TABLES";
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/KustvaktResourceServiceTest.java b/src/test/java/de/ids_mannheim/korap/web/service/KustvaktResourceServiceTest.java
index 62beae8..4f27150 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/KustvaktResourceServiceTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/KustvaktResourceServiceTest.java
@@ -4,6 +4,7 @@
 import com.sun.jersey.api.client.ClientResponse;
 import de.ids_mannheim.korap.config.BeanConfiguration;
 import de.ids_mannheim.korap.config.TestHelper;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.security.auth.BasicHttpAuth;
 import de.ids_mannheim.korap.user.Attributes;
 import de.ids_mannheim.korap.utils.JsonUtils;
@@ -27,7 +28,8 @@
     }
 
     @AfterClass
-    public static void close() {
+    public static void close() throws KustvaktException {
+        BeanConfiguration.getBeans().getResourceProvider().deleteAll();
         BeanConfiguration.closeApplication();
     }
 
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/OAuth2EndpointTest.java b/src/test/java/de/ids_mannheim/korap/web/service/OAuth2EndpointTest.java
index f0865b6..e1dc167 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/OAuth2EndpointTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/OAuth2EndpointTest.java
@@ -35,7 +35,7 @@
                 "de.ids_mannheim.korap.web.filter",
                 "de.ids_mannheim.korap.web.utils");
 
-        TestHelper.setupUser();
+        TestHelper.setupAccount();
         credentials = TestHelper.getUserCredentials();
     }
 
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/OAuth2HandlerTest.java b/src/test/java/de/ids_mannheim/korap/web/service/OAuth2HandlerTest.java
index a804d69..4cf5ecb 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/OAuth2HandlerTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/OAuth2HandlerTest.java
@@ -39,7 +39,7 @@
         info.setUrl("http://localhost:8080/api/v0.1");
         info.setRedirect_uri("testwebsite/login");
 
-        TestHelper.setupUser();
+        TestHelper.setupAccount();
         user = TestHelper.getUser();
         handler.registerClient(info, user);
     }
