Support redirects in WebAPIs

Change-Id: Ic363cfe8e2ec624b4d1ecebeafe5f6f2c10ee072
diff --git a/lib/Kalamar/Plugin/KalamarUser.pm b/lib/Kalamar/Plugin/KalamarUser.pm
index a5db867..41668ee 100644
--- a/lib/Kalamar/Plugin/KalamarUser.pm
+++ b/lib/Kalamar/Plugin/KalamarUser.pm
@@ -26,7 +26,8 @@
   $plugin->api($param->{api}) or return;
   $plugin->ua(Mojo::UserAgent->new(
     connect_timeout => 15,
-    inactivity_timeout => 120
+    inactivity_timeout => 120,
+    max_redirects => 3
   ));
 
   # Set app to server
@@ -60,7 +61,8 @@
 
       my $ua = Mojo::UserAgent->new(
         connect_timeout => 15,
-        inactivity_timeout => 120
+        inactivity_timeout => 120,
+        max_redirects => 3
       );
 
       # Set app to server