Rename all cookies to be instance-independent (Requires relogin) - fixes #94

Change-Id: Icd8b58e4b6fbd99a93ee6972485ef77786b5764c
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 6de66d8..bafa473 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -44,7 +44,10 @@
 
   const d = document;
 
-  KorAP.session = sessionClass.create('KalamarJS');
+  // Create suffix if KorAP is run in a subfolder
+  KorAP.session = sessionClass.create(
+    KorAP.URL.length > 0 ? 'kalamarJS-' + KorAP.URL.slugify() : 'kalamarJS'
+  );
 
   // Override KorAP.log
   window.alertify = alertifyClass;