Merge "Removed comment in sass file as it seems to confuse node-sass"
diff --git a/Changes b/Changes
index 70633ba..618fb05 100755
--- a/Changes
+++ b/Changes
@@ -7,6 +7,7 @@
         - Improve touch support for annotation assistant.
         - Move token table view to marked match.
         - Added metadata headers.
+        - Update to Mojolicious >= 8.02.
 
 0.28 2018-08-29
         - Introduced Widget based plugin system.
diff --git a/Makefile.PL b/Makefile.PL
index de62c37..4293fbf 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -14,7 +14,7 @@
   },
   LICENSE      => 'freebsd',
   PREREQ_PM => {
-    'Mojolicious' => '7.78',
+    'Mojolicious' => '8.02',
     'Mojolicious::Plugin::TagHelpers::Pagination' => 0.06,
     'Mojolicious::Plugin::TagHelpers::MailToChiffre' => 0.09,
     'Mojolicious::Plugin::ClosedRedirect' => 0.14,
diff --git a/lib/Kalamar/Plugin/KalamarUser.pm b/lib/Kalamar/Plugin/KalamarUser.pm
index 41668ee..211c87d 100644
--- a/lib/Kalamar/Plugin/KalamarUser.pm
+++ b/lib/Kalamar/Plugin/KalamarUser.pm
@@ -138,7 +138,8 @@
       });
 
       # Login successful
-      if (my $res = $tx->success) {
+      my $res = $tx->result;
+      unless ($res->error) {
 
         # Get the java token
         my $jwt = $res->json;
@@ -234,9 +235,9 @@
           );
         $tx = $plugin->ua->start($tx);
 
-        unless ($value = $tx->success) {
-          return;
-        }
+        return if $tx->error;
+
+        $value = $tx->result;
         #	else {
         #	  warn $c->dumper($value->json);
         #	};
@@ -279,7 +280,8 @@
       # Start
       $tx = $plugin->ua->start($tx);
 
-      my $res = $tx->success or return;
+      return if $tx->error;
+      my $res = $tx->result;
 
       # Kill all caches!!
       $chi->remove($user . '_' . $param);
@@ -302,7 +304,7 @@
         'get', $url
       );
 
-      if ($tx->success) {
+      unless ($tx->error) {
         # Clear cache
         $c->chi('user')->remove($c->user_auth);