Fixed critical escaping bug in pagination plugin and made this a hard dependency
diff --git a/Changes b/Changes
index d29b526..4b0b29e 100755
--- a/Changes
+++ b/Changes
@@ -1,5 +1,6 @@
-0.06 2014-09-08
+0.06 2014-09-22
         - Updated certain Notifications and AssetPack plugins
+	- Updated pagination plugin.
 
 0.05 2014-07-15
         - Improved tutorial support
diff --git a/Makefile.PL b/Makefile.PL
index 96cf8b3..4fcb944 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -15,7 +15,8 @@
   LICENSE      => 'artistic_2',
   PREREQ_PM => {
     'Mojolicious' => '5.00',
-    'Mojolicious::Plugin::TagHelpers::Pagination' => 0.01,
+#    'Mojolicious::Plugin::Oro::Account' => 0.07,
+    'Mojolicious::Plugin::TagHelpers::Pagination' => 0.04,
     'Mojolicious::Plugin::Notifications' => 0.04,
     'Mojolicious::Plugin::MailException' => 0.18,
     'Mojolicious::Plugin::CHI' => 0.09,
diff --git a/korap.conf b/korap.conf
index 02d0fc9..05a476f 100644
--- a/korap.conf
+++ b/korap.conf
@@ -10,12 +10,31 @@
     engine => 'Korap::Plugin::KorapSearch'
   },
   CHI => {
+    session_cache => {
+      driver     => 'FastMmap',
+      root_dir   => app->home . '/cache/session',
+      cache_size => '3m'
+    },
     default => {
       driver => 'FastMmap',
-      root_dir => app->home . '/cache',
+      root_dir => app->home . '/cache/data',
       cache_size => '12m'
     }
   },
+  Oro => {
+    users => {
+      file => app->home .'/db/users.sqlite'
+    },
+  },
+  'Oro-Session' => {
+    name => 'KorAP',
+    chi_handle => 'session_cache'
+  },
+  'Oro-Account' => {
+    invalid => [qw/corpus collection user admin tutorial/],
+    default_lang => 'de',
+    oro_handle => 'users',
+  },
   hypnotoad => {
     listen => ['http://*:6666', 'http://*:5555'],
     workers => 3
diff --git a/lib/Korap.pm b/lib/Korap.pm
index c57a63a..987d08b 100644
--- a/lib/Korap.pm
+++ b/lib/Korap.pm
@@ -1,12 +1,11 @@
 package Korap;
 use Mojo::Base 'Mojolicious';
 
-our $VERSION = '0.05';
+our $VERSION = '0.06';
 
 # Start dev with
 # morbo -w lib -w templates -w public/sass -w public/js -w public/css script/korap
 
-
 # Start the application and register all routes and plugins
 sub startup {
   my $self = shift;
@@ -28,17 +27,17 @@
 	      KorapSearch
 	      KorapInfo
 	      KorapTagHelpers
-              /) {
+	     /) {
+    # Oro::Account
+    # Oro::Account::ConfirmMail
     $self->plugin($_);
   };
 
-  $self->plugin(AssetPack => {
-    minify => 1
-  });
-
+  $self->plugin(AssetPack => { minify => 1 });
   $self->plugin('AssetPack::LibSass');
   $self->plugin('MailException' => $self->config('MailException'));
 
+  # Add assets for AssetPack
   $self->asset(
     'korap.css' => (
       '/sass/style.scss',
@@ -78,6 +77,14 @@
   # Routes
   my $r = $self->routes;
 
+  # User account management
+  #  $r->route('/login')->acct('login');
+  #  $r->route('/login/forgotten')->acct('forgotten');
+  #  $r->route('/login/remove')->acct('remove');
+  #  $r->route('/register')->acct('register');
+  #  $r->route('/logout')->acct('logout');
+  #  $r->route('/preferences')->acct('preferences');
+
   # Base search route
   $r->get('/')->to('search#remote')->name('index');
 
diff --git a/lib/Korap/Plugin/KorapSearch.pm b/lib/Korap/Plugin/KorapSearch.pm
index 89faeff..9950eec 100644
--- a/lib/Korap/Plugin/KorapSearch.pm
+++ b/lib/Korap/Plugin/KorapSearch.pm
@@ -165,7 +165,7 @@
 	};
 
 	if ($json->{totalResults} > -1) {
-	  $c->app->log->warn('Set total result from cache');
+	  $c->app->log->warn('Cache total result');
 	  $c->stash('search.totalResults' => $json->{totalResults});
 	  $c->chi->set('total-' . $cache_url => $json->{totalResults}, '30min');
 	};
diff --git a/lib/Korap/Search.pm b/lib/Korap/Search.pm
index d3716ab..5918fd9 100644
--- a/lib/Korap/Search.pm
+++ b/lib/Korap/Search.pm
@@ -19,7 +19,7 @@
     my $url = Mojo::URL->new($api)->path('search');
 
     $url->query({
-      q => scalar $c->param('q') // '',
+      q  => scalar $c->param('q') // '',
       ql => scalar $c->param('ql') // 'poliqarp'
     });