diff --git a/lib/Kalamar/Plugin/Auth.pm b/lib/Kalamar/Plugin/Auth.pm
index 8d0b91b..8f770a7 100644
--- a/lib/Kalamar/Plugin/Auth.pm
+++ b/lib/Kalamar/Plugin/Auth.pm
@@ -5,6 +5,8 @@
 # TODO:
 #   CSRF-protect logout!
 
+our $EXPECTED_EXPIRATION_IN = 259200;
+
 # Register the plugin
 sub register {
   my ($plugin, $app, $param) = @_;
@@ -42,7 +44,8 @@
           logoutSuccess => 'Abmeldung erfolgreich',
           logoutFail => 'Abmeldung fehlgeschlagen',
           csrfFail => 'Fehlerhafter CSRF Token',
-          openRedirectFail => 'Weiterleitungsfehler'
+          openRedirectFail => 'Weiterleitungsfehler',
+          refreshFail => 'Fehlerhafter Refresh-Token'
         },
         -en => {
           loginSuccess => 'Login successful',
@@ -50,7 +53,8 @@
           logoutSuccess => 'Logout successful',
           logoutFail => 'Logout failed',
           csrfFail => 'Bad CSRF token',
-          openRedirectFail => 'Redirect failure'
+          openRedirectFail => 'Redirect failure',
+          refreshFail => 'Bad refresh token'
         }
       }
     }
@@ -113,6 +117,40 @@
 
   if ($param->{oauth2}) {
 
+    my $client_id = $param->{client_id};
+    my $client_secret = $param->{client_secret};
+
+    # This refreshes an oauth2 token and
+    # returns a promise
+    $app->helper(
+      'auth.refresh_token' => sub {
+        my $c = shift;
+        my $refresh_token = shift;
+
+        unless ($refresh_token) {
+          return Mojo::Promise->reject({message => 'Missing refresh token'})
+        };
+
+        # Get OAuth access token
+        my $url = Mojo::URL->new($c->korap->api)->path('oauth2/token');
+
+        return $c->korap_request('POST', $url, {} => form => {
+          grant_type => 'refresh_token',
+          client_id => $client_id,
+          client_secret => $client_secret,
+          refresh_token => $refresh_token
+        })->then(
+          sub {
+            # Set the tokens and return a promise
+            return $plugin->set_tokens(
+              $c,
+              shift->result->json
+            )
+          }
+        );
+      }
+    );
+
     # Password flow
     $r->post('/user/login')->to(
       cb => sub {
@@ -159,91 +197,53 @@
           grant_type => 'password',
           username => $user,
           password => $pwd,
-          client_id => $param->{client_id},
-          client_secret => $param->{client_secret}
+          client_id => $client_id,
+          client_secret => $client_secret
         })->then(
           sub {
-            my $tx = shift;
-
-            # Get the token
-            my $json = $tx->result->json;
-
-            # No json object web token
-            unless ($json) {
-              $c->notify(error => 'Response is no valid Json object (remote)');
-              return;
-            };
-
-            # There is an error here
-            # Dealing with errors here
-            if (my $error = $json->{error} // $json->{errors}) {
-              if (ref $error eq 'ARRAY') {
-                foreach (@$error) {
-                  unless ($_->[1]) {
-                    $c->notify(error => $c->loc('Auth_loginFail'));
-                  }
-                  else {
-                    $c->notify(error => $_->[0] . ($_->[1] ? ': ' . $_->[1] : ''));
-                  };
-                };
-              }
-              else {
-                $c->notify(error => $json->{error} . ($json->{error_description} ? ': ' . $json->{error_description} : ''));
-              };
-              return;
-            };
-
-            my $access_token = $json->{access_token};
-            my $token_type =  $json->{token_type};
-            # my $refresh_token = $json->{refresh_token};
-            # my $scope = $json->{scope};
-            # "expires_in": 259200
-
-            # TODO: Deal with user return values.
-            my $auth = $token_type . ' ' . $access_token;
-
-            # </specific>
-
-            $c->app->log->debug(qq!Login successful: "$user" with "$auth"!);
-
-            # TODO:
-            #   Remember refresh token!
-
-            # Set session info
-            $c->session(user => $user);
-            $c->session(auth => $auth);
-
-            # Set stash info
-            $c->stash(user => $user);
-            $c->stash(auth => $auth);
-
-            # Set cache
-            $c->chi('user')->set($auth => $user);
-            $c->notify(success => $c->loc('Auth_loginSuccess'));
+            # Set the tokens and return a promise
+            return $plugin->set_tokens(
+              $c,
+              shift->result->json
+            )
           }
         )->catch(
           sub {
-            my $e = shift;
 
-            # Notify the user
-            $c->notify(
-              error =>
-                ($e->{code} ? $e->{code} . ': ' : '') .
-                $e->{message} . ' for Login (remote)'
-              );
+            # Notify the user on login failure
+            unless (@_) {
+              $c->notify(error => $c->loc('Auth_loginFail'));
+            }
 
-            # Log failure
-            $c->app->log->debug(
-              ($e->{code} ? $e->{code} . ' - ' : '') .
-                $e->{message}
-              );
+            # There are known errors
+            foreach (@_) {
+              if (ref $_ eq 'HASH') {
+                my $err = ($_->{code} ? $_->{code} . ': ' : '') .
+                  $_->{message};
+                $c->notify(error => $err);
+                # Log failure
+                $c->app->log->debug($err);
+              }
+              else {
+                $c->notify(error => $_);
+                $c->app->log->debug($_);
+              };
+            };
 
             $c->app->log->debug(qq!Login fail: "$user"!);
-            $c->notify(error => $c->loc('Auth_loginFail'));
+          }
+        )->then(
+          sub {
+            # Set user info
+            $c->session(user => $user);
+            $c->stash(user => $user);
+
+            # Notify on success
+            $c->app->log->debug(qq!Login successful: "$user"!);
+            $c->notify(success => $c->loc('Auth_loginSuccess'));
           }
         )->finally(
           sub {
-
             # Redirect to slash
             return $c->relative_redirect_to($fwd // 'index');
           }
@@ -410,7 +410,14 @@
         sub {
           my $tx = shift;
           # Clear cache
-          $c->chi('user')->remove($c->auth->token);
+          # ?? Necesseary
+          # $c->chi('user')->remove($c->auth->token);
+
+          # TODO:
+          #   Revoke refresh token!
+          #   based on auth token!
+          # my $refresh_token = $c->chi('user')->get('refr_' . $c->auth->token);
+          # $c->auth->revoke_token($refresh_token)
 
           # Expire session
           $c->session(user => undef);
@@ -440,6 +447,62 @@
   )->name('logout');
 };
 
+# Sets a requested token and returns
+# an error, if it didn't work
+sub set_tokens {
+  my ($plugin, $c, $json) = @_;
+
+  my $promise = Mojo::Promise->new;
+
+  # No json object
+  unless ($json) {
+    return $promise->reject({message => 'Response is no valid Json object (remote)'});
+  };
+
+  # There is an error here
+  # Dealing with errors here
+  if ($json->{error} && ref $json->{error} ne 'ARRAY') {
+    return $promise->reject(
+      {
+        message => $json->{error} . ($json->{error_description} ? ': ' . $json->{error_description} : '')
+      }
+    );
+  } elsif (my $error = $json->{errors} // $json->{error}) {
+    if (ref $error eq 'ARRAY') {
+      my @errors = ();
+      foreach (@{$error}) {
+        if ($_->[1]) {
+          push @errors, { code => $_->[0], message => $_->[1]}
+        }
+      }
+      return $promise->reject(@errors);
+    }
+
+    return $promise->reject({message => $error});
+  };
+
+  my $access_token = $json->{access_token};
+  my $token_type =  $json->{token_type};
+  my $refresh_token = $json->{refresh_token};
+  # my $scope = $json->{scope};
+  my $expires_in = $json->{"expires_in"} // $EXPECTED_EXPIRATION_IN;
+  my $auth = $token_type . ' ' . $access_token;
+
+  # Set session info
+  $c->session(auth => $auth);
+
+  # Set stash info
+  $c->stash(auth => $auth);
+
+  # Remember refresh token in cache
+  $c->chi('user')->set(
+    "refr_" . $auth => $refresh_token,
+    $expires_in
+  );
+
+  return $promise->resolve;
+}
+
 1;
 
 __DATA__
diff --git a/lib/Kalamar/Plugin/KalamarUser.pm b/lib/Kalamar/Plugin/KalamarUser.pm
index 83c5fe2..60fadfe 100644
--- a/lib/Kalamar/Plugin/KalamarUser.pm
+++ b/lib/Kalamar/Plugin/KalamarUser.pm
@@ -37,6 +37,13 @@
   # Set app to server
   $plugin->ua->server->app($mojo);
 
+  # Get a user agent object for Kalamar
+  $mojo->helper(
+    'kalamar_ua' => sub {
+      return $plugin->ua;
+    }
+  );
+
   # Get user handle
   $mojo->helper(
     'user_handle' => sub {
diff --git a/t/plugin/auth-oauth.t b/t/plugin/auth-oauth.t
index 2769515..d67837f 100644
--- a/t/plugin/auth-oauth.t
+++ b/t/plugin/auth-oauth.t
@@ -109,7 +109,7 @@
 $csrf = $t->get_ok('/')
   ->status_is(200)
   ->element_exists('div.notify-error')
-  ->text_is('div.notify-error', 'Access denied')
+  ->text_is('div.notify-error', '2022: LDAP Authentication failed due to unknown user or password!')
   ->element_exists('input[name=handle_or_email][value=test]')
   ->element_exists_not('div.button.top a')
   ->tx->res->dom->at('input[name=csrf_token]')->attr('value')
@@ -133,7 +133,6 @@
   ->element_exists_not('aside.active')
   ;
 
-
 # Now the user is logged in and should be able to
 # search with authorization
 $t->get_ok('/?q=Baum')
@@ -199,11 +198,70 @@
   ->status_is(302)
   ->header_is('Location' => '/?q=Baum&ql=poliqarp');
 
+$t->get_ok('/?q=Baum&ql=poliqarp')
+  ->status_is(200)
+  ->element_exists_not('div.notify-error')
+  ->element_exists('div.notify-success')
+  ->text_is('div.notify-success', 'Login successful')
+  ;
+
+$t->app->routes->get(
+  '/user/refresh' => sub {
+    my $c = shift;
+
+    my $old_auth = $c->auth->token;
+    my $refresh = $c->chi('user')->get("refr_$old_auth");
+
+    $c->auth->refresh_token($refresh)->then(
+      sub {
+        my $new_auth = $c->auth->token;
+        $c->notify(success => $new_auth . ' vs. ' . $old_auth);
+      }
+    )->catch(
+      sub {
+
+        # Notify the user on login failure
+        unless (@_) {
+          $c->notify(error => $c->loc('Auth_refreshFail'));
+        }
+
+        # There are known errors
+        foreach (@_) {
+          if (ref $_ eq 'HASH') {
+            my $err = ($_->{code} ? $_->{code} . ': ' : '') .
+              $_->{message};
+            $c->notify(error => $err);
+          }
+          else {
+            $c->notify(error => $_);
+          }
+        };
+      }
+    )->finally(
+      sub {
+        return $c->redirect_to('index');
+      }
+    )->wait;
+  }
+);
+
+$t->get_ok('/user/refresh')
+  ->status_is(302)
+  ->header_is('Location' => '/');
+
+$t->get_ok('/')
+  ->status_is(200)
+  ->element_exists_not('div.notify-error')
+  ->element_exists('div.notify-success')
+  ->text_like('div.notify-success', qr!Bearer abcde vs\. Bearer .{6,}!)
+  ;
+
 
 done_testing;
 __END__
 
 
+
 # Login mit falschem Nutzernamen:
 # 400 und:
 {"errors":[[2022,"LDAP Authentication failed due to unknown user or password!"]]}
diff --git a/t/server/mock.pl b/t/server/mock.pl
index e32365e..359f78c 100644
--- a/t/server/mock.pl
+++ b/t/server/mock.pl
@@ -278,62 +278,98 @@
 post '/oauth2/token' => sub {
   my $c = shift;
 
-  # Check for wrong client id
-  if ($c->param('client_id') ne '2') {
-    return $c->render(
-      json => {
-        "error_description" => "Unknown client with " . $_->{client_id},
-        "error" => "invalid_client"
-      },
-      status => 401
-    );
-  }
+  if ($c->param('grant_type') eq 'password') {
 
-  # Check for wrong client secret
-  elsif ($c->param('client_secret') ne 'k414m4r-s3cr3t') {
-    return $c->render(
-      json => {
-        "error_description" => "Invalid client credentials",
-        "error" => "invalid_client"
-      },
-      status => 401
-    );
-  }
+    # Check for wrong client id
+    if ($c->param('client_id') ne '2') {
+      return $c->render(
+        json => {
+          "error_description" => "Unknown client with " . $_->{client_id},
+          "error" => "invalid_client"
+        },
+        status => 401
+      );
+    }
 
-  # Check for wrong user name
-  elsif ($c->param('username') ne 'test') {
-    return $c->render(json => {
-      error => [[2004, undef]]
-    });
-  }
+    # Check for wrong client secret
+    elsif ($c->param('client_secret') ne 'k414m4r-s3cr3t') {
+      return $c->render(
+        json => {
+          "error_description" => "Invalid client credentials",
+          "error" => "invalid_client"
+        },
+        status => 401
+      );
+    }
 
-  # Check for ldap error
-  elsif ($c->param('password') eq 'ldaperr') {
-    return $c->render(
-      format => 'html',
-      status => 401,
-      json => {
+    # Check for wrong user name
+    elsif ($c->param('username') ne 'test') {
+      return $c->render(json => {
+        error => [[2004, undef]]
+      });
+    }
+
+    # Check for ldap error
+    elsif ($c->param('password') eq 'ldaperr') {
+      return $c->render(
+        format => 'html',
+        status => 401,
+        json => {
+          "errors" => [
+            [
+              2022,
+              "LDAP Authentication failed due to unknown user or password!"
+            ]
+          ]
+        }
+      );
+    }
+
+    # Check for wrong password
+    elsif ($c->param('password') ne 'pass') {
+      return $c->render(json => {
+        format => 'html',
+        status => 401,
         "errors" => [[2022,"LDAP Authentication failed due to unknown user or password!"]]
+      });
+    }
+
+    # Return fine access
+    return $c->render(
+      json => {
+        "access_token" => "4dcf8784ccfd26fac9bdb82778fe60e2",
+        "refresh_token" => "hlWci75xb8atDiq3924NUSvOdtAh7Nlf9z",
+        "scope" => "all",
+        "token_type" => "Bearer",
+        "expires_in" => 86400
+      });
+  }
+
+  # Refresh token
+  elsif ($c->param('grant_type') eq 'refresh_token') {
+    return $c->render(
+      status => 200,
+      json => {
+        "access_token" => "abcde",
+        "refresh_token" => "fghijk",
+        "token_type" => "Bearer",
+        "expires_in" => 86400
       }
     );
   }
 
-  # Check for wrong password
-  elsif ($c->param('password') ne 'pass') {
-    return $c->render(json => {
-      error => [[2004, undef]]
-    });
+  # Unknown token grant
+  else {
+    return $c->render(
+      json => {
+        "errors" => [
+          [
+            0, "Grant Type unknown", $c->param("grant_type")
+          ]
+        ]
+      }
+    )
   }
-
-  # Return fine access
-  return $c->render(
-    json => {
-      "access_token" => "4dcf8784ccfd26fac9bdb82778fe60e2",
-      "refresh_token" => "hlWci75xb8atDiq3924NUSvOdtAh7Nlf9z",
-      "scope" => "all",
-      "token_type" => "Bearer",
-      "expires_in" => 86400
-    });
 };
 
 
