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 b9fd4dd..e05386b 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/UserDetailsDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/UserDetailsDao.java
@@ -28,7 +28,7 @@
 
     @Override
     public int store(UserDetails data) {
-        String sql = "INSERT INTO user_details2 (user_id, data) VALUES (:userid, :data);";
+        String sql = "INSERT INTO user_details (user_id, data) VALUES (:userid, :data);";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("userid", data.getUserID());
         source.addValue("data", data.data());
@@ -47,7 +47,7 @@
 
     @Override
     public int update(UserDetails data) {
-        String sql = "UPDATE user_details2 SET data = :data WHERE user_id=:userid;";
+        String sql = "UPDATE user_details SET data = :data WHERE user_id=:userid;";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("userid", data.getUserID());
         source.addValue("data", data.data());
@@ -61,7 +61,7 @@
 
     @Override
     public UserDetails get(Integer id) {
-        String sql = "SELECT * FROM user_details2 WHERE id=:id;";
+        String sql = "SELECT * FROM user_details WHERE id=:id;";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("id", id);
 
@@ -87,7 +87,7 @@
 
     @Override
     public UserDetails get(User user) {
-        String sql = "SELECT * FROM user_details2 WHERE user_id=:userid;";
+        String sql = "SELECT * FROM user_details WHERE user_id=:userid;";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("userid", user.getId());
 
@@ -114,7 +114,7 @@
 
     @Override
     public int delete(UserDetails data) {
-        String sql = "DELETE FROM user_details2 WHERE id=:id";
+        String sql = "DELETE FROM user_details WHERE id=:id";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("id", data.getId());
         try {
@@ -126,7 +126,7 @@
 
     @Override
     public int deleteAll() {
-        String sql = "DELETE FROM user_details2;";
+        String sql = "DELETE FROM user_details;";
         try {
             return this.jdbcTemplate.update(sql, new HashMap<String, Object>());
         }catch (DataAccessException e) {
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 948eae3..d343dca 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/UserSettingsDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/UserSettingsDao.java
@@ -27,7 +27,7 @@
     }
     @Override
     public int store(UserSettings data) {
-        String sql = "INSERT INTO user_settings2 (user_id, data) VALUES (:userid, :data);";
+        String sql = "INSERT INTO user_settings (user_id, data) VALUES (:userid, :data);";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("userid", data.getUserID());
         source.addValue("data", data.data());
@@ -46,7 +46,7 @@
 
     @Override
     public int update(UserSettings data) {
-        String sql = "UPDATE user_settings2 SET data = :data WHERE user_id=:userid;";
+        String sql = "UPDATE user_settings SET data = :data WHERE user_id=:userid;";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("userid", data.getUserID());
         source.addValue("data", data.data());
@@ -60,7 +60,7 @@
 
     @Override
     public UserSettings get(Integer id) {
-        String sql = "SELECT * FROM user_settings2 WHERE id=:id;";
+        String sql = "SELECT * FROM user_settings WHERE id=:id;";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("id", id);
 
@@ -86,7 +86,7 @@
 
     @Override
     public UserSettings get(User user) {
-        String sql = "SELECT * FROM user_settings2 WHERE user_id=:userid;";
+        String sql = "SELECT * FROM user_settings WHERE user_id=:userid;";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("userid", user.getId());
 
@@ -113,7 +113,7 @@
 
     @Override
     public int delete(UserSettings data) {
-        String sql = "DELETE FROM user_settings2 WHERE id=:id";
+        String sql = "DELETE FROM user_settings WHERE id=:id";
         MapSqlParameterSource source = new MapSqlParameterSource();
         source.addValue("id", data.getId());
         try {
@@ -125,7 +125,7 @@
 
     @Override
     public int deleteAll() {
-        String sql = "DELETE FROM user_settings2;";
+        String sql = "DELETE FROM user_settings;";
         try {
             return this.jdbcTemplate.update(sql, new HashMap<String, Object>());
         }catch (DataAccessException e) {
diff --git a/src/main/java/de/ids_mannheim/korap/resource/LayerMapper.java b/src/main/java/de/ids_mannheim/korap/resource/LayerMapper.java
index e59f849..7c0bc50 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/LayerMapper.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/LayerMapper.java
@@ -1,6 +1,7 @@
 package de.ids_mannheim.korap.resource;
 
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
+import de.ids_mannheim.korap.user.Attributes;
 import de.ids_mannheim.korap.user.UserSettings;
 
 /**
@@ -32,15 +33,20 @@
     //todo: make mapping configurable!
     public String findFoundry(String layer) {
         if (settings != null) {
+
             switch (translateLayer(layer.toLowerCase().trim())) {
                 case "d":
-                    return settings.getDefaultRelfoundry();
+                    return (String) settings
+                            .get(Attributes.DEFAULT_REL_FOUNDRY);
                 case "c":
-                    return settings.getDefaultConstfoundry();
+                    return (String) settings
+                            .get(Attributes.DEFAULT_CONST_FOUNDRY);
                 case "pos":
-                    return settings.getDefaultPOSfoundry();
+                    return (String) settings
+                            .get(Attributes.DEFAULT_POS_FOUNDRY);
                 case "lemma":
-                    return settings.getDefaultLemmafoundry();
+                    return (String) settings
+                            .get(Attributes.DEFAULT_LEMMA_FOUNDRY);
                 case "surface":
                     return "opennlp";
                 default:
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 a53cf73..adcb263 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
@@ -23,7 +23,6 @@
 
 import java.io.UnsupportedEncodingException;
 import java.security.NoSuchAlgorithmException;
-import java.util.HashMap;
 import java.util.Map;
 
 /**
@@ -529,12 +528,20 @@
                         (String) safeMap.get(Attributes.MAIL),
                         (String) safeMap.get(Attributes.CN));
         user.setAffiliation((String) safeMap.get(Attributes.EDU_AFFIL));
-        UserDetails det = UserDetails
-                .newDetailsIterator(new HashMap<String, String>());
-        user.setDetails(det);
-        user.setSettings(new UserSettings());
         user.setAccountCreation(TimeUtils.getNow().getMillis());
         entHandler.createAccount(user);
+
+        UserDetails d = new UserDetails(user.getId());
+        d.readDefaults(attributes);
+        d.checkRequired();
+
+        UserdataFactory.getDaoInstance(d.getClass()).store(d);
+
+        UserSettings s = new UserSettings(user.getId());
+        s.readDefaults(attributes);
+        s.checkRequired();
+        UserdataFactory.getDaoInstance(s.getClass()).store(s);
+
         return user;
     }
 
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 70eb878..22da0e8 100644
--- a/src/main/java/de/ids_mannheim/korap/user/DemoUser.java
+++ b/src/main/java/de/ids_mannheim/korap/user/DemoUser.java
@@ -14,10 +14,9 @@
     private static final long ACCOUNT_CREATED = 1377102171202L;
     public static final String PASSPHRASE = "$2a$15$rGPvLWm5JJ1iYj0V61e5guYIGmSo.rjdBkAVIU1vWS/xdybmABxRa";
 
+    // todo: test functionality!
     protected DemoUser() {
         super(DEMOUSER_NAME, 2);
-        this.setDetails(new UserDetails());
-        this.setSettings(new UserSettings());
         this.setAccountCreation(ACCOUNT_CREATED);
 //        this.setQueries(UserQuery.demoUserQueries());
     }
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 22c8188..95330b1 100644
--- a/src/main/java/de/ids_mannheim/korap/user/User.java
+++ b/src/main/java/de/ids_mannheim/korap/user/User.java
@@ -70,20 +70,6 @@
         return this.fields.get(cl);
     }
 
-    //todo: repair transfer
-    public void transfer(User user) {
-        //        this.setSettings(user.getSettings());
-        //        this.setDetails(user.getDetails());
-        //        this.setQueries(user.getQueries());
-        if (this instanceof KorAPUser) {
-
-            //            this.getSettings().setUserID(this.id);
-            //            this.getDetails().setUserID(this.id);
-            //            for (UserQuery q : this.getQueries())
-            //                q.setOwner(this.accountID);
-        }
-    }
-
     public void addUserData(Userdata data) {
         if (data != null) {
             for (Userdata d : this.userdata) {
@@ -95,20 +81,6 @@
         }
     }
 
-    @Deprecated
-    public void setDetails(UserDetails details) {
-        if (details != null)
-            details.setUserID(this.id);
-        //        this.details = details;
-    }
-
-    @Deprecated
-    public void setSettings(UserSettings settings) {
-        if (settings != null)
-            settings.setUserID(this.id);
-        //        this.settings = settings;
-    }
-
     public void setId(Integer id) {
         this.id = id;
         //        if (this.settings != null)
diff --git a/src/main/java/de/ids_mannheim/korap/user/Userdata.java b/src/main/java/de/ids_mannheim/korap/user/Userdata.java
index bf53486..616857d 100644
--- a/src/main/java/de/ids_mannheim/korap/user/Userdata.java
+++ b/src/main/java/de/ids_mannheim/korap/user/Userdata.java
@@ -119,12 +119,13 @@
         this.fields = crypto.validateMap(this.fields);
     }
 
-    public void readDefaults(Map<String, Object> map) {
+    public void readDefaults(Map<String, Object> map) throws KustvaktException {
         for (String k : defaultFields()) {
             Object o = map.get(k);
             if (o != null)
                 this.fields.put(k, o);
         }
+        this.checkRequired();
     }
 
     public abstract String[] requiredFields();
diff --git a/src/main/java/de/ids_mannheim/korap/user/Usersettings.java b/src/main/java/de/ids_mannheim/korap/user/Usersettings.java
index dd4190c..1d0c758 100644
--- a/src/main/java/de/ids_mannheim/korap/user/Usersettings.java
+++ b/src/main/java/de/ids_mannheim/korap/user/Usersettings.java
@@ -16,6 +16,8 @@
         return new String[0];
     }
 
+
+    //todo: define default fields and values --> so they can never be null!
     @Override
     public String[] defaultFields() {
         return new String[0];
diff --git a/src/main/java/de/ids_mannheim/korap/utils/CollectionQueryBuilder3.java b/src/main/java/de/ids_mannheim/korap/utils/CollectionQueryBuilder3.java
index 220b6b9..49f7041 100644
--- a/src/main/java/de/ids_mannheim/korap/utils/CollectionQueryBuilder3.java
+++ b/src/main/java/de/ids_mannheim/korap/utils/CollectionQueryBuilder3.java
@@ -5,6 +5,8 @@
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import de.ids_mannheim.korap.query.serialize.CollectionQueryProcessor;
 
+import java.util.Map;
+
 /**
  * convenience builder class for collection query
  *
@@ -31,37 +33,38 @@
         this.base = null;
     }
 
-//    /**
-//     * convencience method for equal field value search operation
-//     * @param field
-//     * @param value
-//     * @return
-//     */
-//    public CollectionQueryBuilder3 eq(String field, String value) {
-//        fieldValue(field, "match:eq", value);
-//        return this;
-//    }
-//
-//    /**
-//     * convencience method for unequal field value search operation
-//     * @param field
-//     * @param value
-//     * @return
-//     */
-//    public CollectionQueryBuilder3 uneq(String field, String value) {
-//        fieldValue(field, "match:ne", value);
-//        return this;
-//    }
-
+    //    /**
+    //     * convencience method for equal field value search operation
+    //     * @param field
+    //     * @param value
+    //     * @return
+    //     */
+    //    public CollectionQueryBuilder3 eq(String field, String value) {
+    //        fieldValue(field, "match:eq", value);
+    //        return this;
+    //    }
+    //
+    //    /**
+    //     * convencience method for unequal field value search operation
+    //     * @param field
+    //     * @param value
+    //     * @return
+    //     */
+    //    public CollectionQueryBuilder3 uneq(String field, String value) {
+    //        fieldValue(field, "match:ne", value);
+    //        return this;
+    //    }
 
     /**
      * raw method for field - value pair adding. Supports all operators (leq, geq, contains, etc.)
+     *
      * @param field
      * @param op
      * @param value
      * @return
      */
-    public CollectionQueryBuilder3 fieldValue(String field, String op, String value) {
+    public CollectionQueryBuilder3 fieldValue(String field, String op,
+            String value) {
         if (base == null)
             this.builder.append(field + op + value);
         else {
@@ -109,8 +112,10 @@
             CollectionQueryProcessor tree = new CollectionQueryProcessor(
                     this.verbose);
             tree.process(this.builder.toString());
-
-            request = tree.getRequestMap();
+            Map r = tree.getRequestMap();
+            r.remove("query");
+            r.remove("meta");
+            request = r;
         }
         return request;
     }
@@ -144,7 +149,6 @@
         return this;
     }
 
-
     public static class Utils {
 
         public static JsonNode buildDoc(String key, String value, String op) {
diff --git a/src/main/java/de/ids_mannheim/korap/utils/UserPropertyReader.java b/src/main/java/de/ids_mannheim/korap/utils/UserPropertyReader.java
index 560970d..3369106 100644
--- a/src/main/java/de/ids_mannheim/korap/utils/UserPropertyReader.java
+++ b/src/main/java/de/ids_mannheim/korap/utils/UserPropertyReader.java
@@ -5,10 +5,7 @@
 import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.interfaces.EncryptionIface;
 import de.ids_mannheim.korap.interfaces.db.EntityHandlerIface;
-import de.ids_mannheim.korap.user.KorAPUser;
-import de.ids_mannheim.korap.user.User;
-import de.ids_mannheim.korap.user.UserDetails;
-import de.ids_mannheim.korap.user.UserSettings;
+import de.ids_mannheim.korap.user.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -74,9 +71,10 @@
                 throw new KustvaktException(StatusCodes.REQUEST_INVALID);
             }
             user.setPassword(pass);
+            iface.createAccount(user);
         }else {
             user = User.UserFactory.getUser(username);
-            Map<String, String> vals = new HashMap<>();
+            Map<String, Object> vals = new HashMap<>();
             for (Map.Entry e : p.entrySet()) {
                 String key = e.getKey().toString().split("\\.", 2)[1];
                 vals.put(key, e.getValue().toString());
@@ -97,14 +95,20 @@
             user.setAccountCreation(TimeUtils.getNow().getMillis());
 
             //todo: make sure uri is set to 0, so sql queries work with the null value
-//            user.setURIExpiration(0L);
+            //            user.setURIExpiration(0L);
+            iface.createAccount(user);
+            UserDetails det = new UserDetails(user.getId());
+            det.readDefaults(vals);
+            det.validate(crypto);
+            UserdataFactory.getDaoInstance(det.getClass()).store(det);
 
-            UserDetails det = UserDetails.newDetailsIterator(vals);
+            Userdata set = new UserSettings(user.getId());
+            set.readDefaults(vals);
+            set.validate(crypto);
+            UserdataFactory.getDaoInstance(set.getClass()).store(set);
 
-            user.setDetails(det);
-            user.setSettings(new UserSettings());
         }
-        iface.createAccount(user);
+
         jlog.info("successfully created account for user {}",
                 user.getUsername());
         return user;
diff --git a/src/main/java/de/ids_mannheim/korap/web/service/full/AuthService.java b/src/main/java/de/ids_mannheim/korap/web/service/full/AuthService.java
index 5199855..490479d 100644
--- a/src/main/java/de/ids_mannheim/korap/web/service/full/AuthService.java
+++ b/src/main/java/de/ids_mannheim/korap/web/service/full/AuthService.java
@@ -56,12 +56,13 @@
      *
      * @return String
      */
+    @Deprecated
     @GET
     @Path("bootstrap")
     @Produces(MediaType.APPLICATION_JSON)
     public Response bootstrap() {
         Map m = new HashMap();
-        m.put("settings", new UserSettings().toObjectMap());
+//        m.put("settings", new UserSettings().toObjectMap());
         m.put("ql", BeanConfiguration.getBeans().getConfiguration()
                 .getQueryLanguages());
         m.put("SortTypes", null); // types of sorting that are supported!
diff --git a/src/main/java/de/ids_mannheim/korap/web/utils/KustvaktMap.java b/src/main/java/de/ids_mannheim/korap/web/utils/KustvaktMap.java
new file mode 100644
index 0000000..c6b618a
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/web/utils/KustvaktMap.java
@@ -0,0 +1,69 @@
+package de.ids_mannheim.korap.web.utils;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author hanl
+ * @date 21/01/2016
+ */
+public class KustvaktMap {
+
+    private boolean mono;
+    private Map<String, Object> values;
+
+    public KustvaktMap() {
+        this.values = new HashMap<>();
+        this.mono = false;
+    }
+
+    public KustvaktMap(Map<String, Object> m) {
+        this();
+        setMap(m);
+    }
+
+    public void setMap(Map<String, Object> m) {
+        if (!isGeneric(m) | !this.mono)
+            this.values.putAll(m);
+    }
+
+    public boolean isGeneric() {
+        return !this.mono && isGeneric(this.values);
+    }
+
+    private static boolean isGeneric(Map<String, Object> map) {
+        int i = 0;
+        for (Object o : map.values()) {
+            if (o instanceof String)
+                i++;
+        }
+        return !(i == map.size());
+    }
+
+    public void setMonoValue(boolean monovalue) {
+        this.mono = monovalue;
+    }
+
+    public String get(String key) {
+        Object o = this.values.get(key);
+        if (!isGeneric())
+            return (String) o;
+        return String.valueOf(o);
+    }
+
+    public Object getRaw(String key) {
+        return this.values.get(key);
+    }
+
+    public <T extends Object> Object get(String key, Class<T> cl) {
+        if (isGeneric())
+            return (T) this.values.get(key);
+        return get(key);
+    }
+
+    public Set<String> keySet() {
+        return this.values.keySet();
+    }
+
+}
diff --git a/src/main/resources/db/sqlite/V1__Initial_version.sql b/src/main/resources/db/sqlite/V1__Initial_version.sql
index c26fce3..69fd635 100644
--- a/src/main/resources/db/sqlite/V1__Initial_version.sql
+++ b/src/main/resources/db/sqlite/V1__Initial_version.sql
@@ -23,55 +23,11 @@
 
 CREATE TABLE IF NOT EXISTS user_details (
 id INTEGER PRIMARY KEY AUTOINCREMENT,
-user_id INTEGER NOT NULL,
-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
-);
-
-CREATE TABLE IF NOT EXISTS user_settings (
-id INTEGER PRIMARY KEY AUTOINCREMENT,
-user_id INTEGER NOT NULL,
-fileNameForExport VARCHAR(100),
-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,
-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
-);
-
-CREATE TABLE IF NOT EXISTS user_details2 (
-id INTEGER PRIMARY KEY AUTOINCREMENT,
 user_id INTEGER UNIQUE NOT NULL,
 data BLOB NOT NULL
 );
 
-CREATE TABLE IF NOT EXISTS user_settings2 (
+CREATE TABLE IF NOT EXISTS user_settings (
 id INTEGER PRIMARY KEY AUTOINCREMENT,
 user_id INTEGER UNIQUE NOT NULL,
 data BLOB NOT NULL
diff --git a/src/test/java/FileAuditingTest.java b/src/test/java/FileAuditingTest.java
index 23b589c..0e62e12 100644
--- a/src/test/java/FileAuditingTest.java
+++ b/src/test/java/FileAuditingTest.java
@@ -23,10 +23,6 @@
     @AfterClass
     public static void finish() {
         BeanConfiguration.closeApplication();
-//        File f = new File("logs/default_audit.log");
-//        System.out.println("------------------------------------------------------");
-//        System.out.println("FILE LENGTH "+f.length());
-//        assert f.length() > 0;
     }
 
     @Test
diff --git a/src/test/java/UserdataTest.java b/src/test/java/UserdataTest.java
index f8cd1b9..c3cc6b8 100644
--- a/src/test/java/UserdataTest.java
+++ b/src/test/java/UserdataTest.java
@@ -1,6 +1,7 @@
 import de.ids_mannheim.korap.config.BeanConfiguration;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.handlers.UserDetailsDao;
+import de.ids_mannheim.korap.handlers.UserSettingsDao;
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 import de.ids_mannheim.korap.user.*;
 import org.junit.AfterClass;
@@ -28,7 +29,10 @@
     public void clear() {
         UserDetailsDao dao = new UserDetailsDao(
                 BeanConfiguration.getBeans().getPersistenceClient());
+        UserSettingsDao sdao = new UserSettingsDao(
+                BeanConfiguration.getBeans().getPersistenceClient());
         assert dao.deleteAll() != -1;
+        assert sdao.deleteAll() != -1;
     }
 
     @Test
@@ -87,8 +91,7 @@
 
     @Test
     public void testUserdatafactory() throws KustvaktException {
-        UserDataDbIface dao = UserdataFactory
-                .getDaoInstance(UserDetails.class);
+        UserDataDbIface dao = UserdataFactory.getDaoInstance(UserDetails.class);
         assert UserDetailsDao.class.equals(dao.getClass());
     }
 
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 c96906d..c1e2cd1 100644
--- a/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
+++ b/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
@@ -54,6 +54,17 @@
         return r;
     }
 
+    public static User getUser() {
+        if (BeanConfiguration.hasContext()) {
+            try {
+                return BeanConfiguration.getBeans().getUserDBHandler()
+                        .getAccount(credentials[0]);
+            }catch (KustvaktException e) {
+            }
+        }
+        throw new RuntimeException("User could not be retrieved!");
+    }
+
     public static boolean dropUser() {
         boolean r = BeanConfiguration.hasContext();
         if (r) {
@@ -126,7 +137,8 @@
                     // don't do anything!
                 }
             }
-        }
+        }else
+            throw new RuntimeException("Client not setup properly!");
     }
 
     private TestHelper() {
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/KustvaktCoreRestTest.java b/src/test/java/de/ids_mannheim/korap/web/service/KustvaktCoreRestTest.java
index 57d0a3d..d42a446 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/KustvaktCoreRestTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/KustvaktCoreRestTest.java
@@ -17,7 +17,6 @@
  * @author hanl
  * @date 26/06/2015
  */
-//todo: check tranferable index config path for test cases
 public class KustvaktCoreRestTest extends FastJerseyTest {
 
     @BeforeClass
@@ -83,6 +82,7 @@
     }
 
     @Test
+    @Ignore
     public void testGetStats2ThrowsNoException() {
         ClientResponse response = resource().path(getAPIVersion()).path("stats")
                 .post(ClientResponse.class, "creationDate in 1787");
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 576eee0..f0865b6 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
@@ -9,18 +9,21 @@
 import de.ids_mannheim.korap.utils.JsonUtils;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
 
 /**
  * @author hanl
  * @date 23/09/2015
  */
-// todo: needs servlet container test server!
+// todo: in combination with other tests, causes failures!
 public class OAuth2EndpointTest extends FastJerseyTest {
 
     private static String[] credentials;
 
     @AfterClass
     public static void close() {
+        System.out.println("RUNNING AFTER CLASS SHUTDOWN");
         TestHelper.dropUser();
         BeanConfiguration.closeApplication();
     }
@@ -36,7 +39,13 @@
         credentials = TestHelper.getUserCredentials();
     }
 
-//    @Test
+    @Test
+    public void init() {
+
+    }
+
+    @Test
+    @Ignore
     public void testAuthorizeClient() {
         ClientResponse response = resource().path("v0.1").path("oauth2")
                 .path("register")
@@ -46,7 +55,8 @@
         assert response.getStatus() == ClientResponse.Status.OK.getStatusCode();
     }
 
-//    @Test
+    @Test
+    @Ignore
     public void testRevokeClient() {
         ClientResponse response = resource().path("v0.1").path("oauth2")
                 .path("register")
@@ -58,7 +68,8 @@
 
     }
 
-//    @Test
+    @Test
+    @Ignore
     public void authenticate() {
         String enc = BasicHttpAuth.encode(credentials[0], credentials[1]);
         ClientResponse response = resource().path("v0.1").path("oauth2")
@@ -79,7 +90,7 @@
                 .queryParam("client_secret", cl_s)
                 .queryParam("response_type", "code")
                 .queryParam("redirect_uri", "korap.ids-mannheim.de/redirect")
-//                .header(Attributes.AUTHORIZATION, enc)
+                //                .header(Attributes.AUTHORIZATION, enc)
                 .header("Content-Type", "application/x-www-form-urlencoded")
                 .post(ClientResponse.class);
 
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 f0d3d2a..a804d69 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
@@ -3,10 +3,10 @@
 import de.ids_mannheim.korap.config.AuthCodeInfo;
 import de.ids_mannheim.korap.config.BeanConfiguration;
 import de.ids_mannheim.korap.config.ClientInfo;
+import de.ids_mannheim.korap.config.TestHelper;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.handlers.OAuth2Handler;
 import de.ids_mannheim.korap.interfaces.EncryptionIface;
-import de.ids_mannheim.korap.user.KorAPUser;
 import de.ids_mannheim.korap.user.TokenContext;
 import de.ids_mannheim.korap.user.User;
 import org.junit.AfterClass;
@@ -25,7 +25,7 @@
     private static OAuth2Handler handler;
     private static EncryptionIface crypto;
     private static final String SCOPES = "search preferences queries account";
-    private static final KorAPUser user = User.UserFactory.getUser("test_user");
+    private static User user;
 
     @BeforeClass
     public static void setup() throws KustvaktException {
@@ -39,8 +39,8 @@
         info.setUrl("http://localhost:8080/api/v0.1");
         info.setRedirect_uri("testwebsite/login");
 
-        user.setPassword("testPassword123");
-        BeanConfiguration.getBeans().getUserDBHandler().createAccount(user);
+        TestHelper.setupUser();
+        user = TestHelper.getUser();
         handler.registerClient(info, user);
     }
 
@@ -48,8 +48,7 @@
     public static void drop() throws KustvaktException {
         assert handler != null;
         handler.removeClient(info, user);
-        BeanConfiguration.getBeans().getUserDBHandler()
-                .deleteAccount(user.getId());
+        TestHelper.dropUser();
         BeanConfiguration.closeApplication();
     }
 
