diff --git a/ccm-core/src/main/java/org/libreccm/ui/login/LoginController.java b/ccm-core/src/main/java/org/libreccm/ui/login/LoginController.java
index 01df138c7..d75e0c61d 100644
--- a/ccm-core/src/main/java/org/libreccm/ui/login/LoginController.java
+++ b/ccm-core/src/main/java/org/libreccm/ui/login/LoginController.java
@@ -118,7 +118,7 @@ public class LoginController {
models.put("loginFailed", true);
return getLoginForm(uriInfo, returnUrl);
}
-
+
try {
return Response.seeOther(
new URI(
diff --git a/ccm-core/src/main/java/org/libreccm/ui/login/LogoutApplication.java b/ccm-core/src/main/java/org/libreccm/ui/login/LogoutApplication.java
new file mode 100644
index 000000000..6d942471a
--- /dev/null
+++ b/ccm-core/src/main/java/org/libreccm/ui/login/LogoutApplication.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.ui.login;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@ApplicationPath("/@logout")
+public class LogoutApplication extends Application {
+
+ @Override
+ public Set> getClasses() {
+ final Set> classes = new HashSet<>();
+ classes.add(LogoutController.class);
+ return classes;
+ }
+
+}
diff --git a/ccm-core/src/main/java/org/libreccm/ui/login/LogoutController.java b/ccm-core/src/main/java/org/libreccm/ui/login/LogoutController.java
new file mode 100644
index 000000000..48f41ccf9
--- /dev/null
+++ b/ccm-core/src/main/java/org/libreccm/ui/login/LogoutController.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.ui.login;
+
+import org.apache.shiro.subject.Subject;
+import org.libreccm.theming.mvc.ThemesMvc;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+import javax.mvc.Controller;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.UriInfo;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@Controller
+@Path("/")
+@RequestScoped
+public class LogoutController {
+
+ @Inject
+ private Subject subject;
+
+ @Inject
+ private ThemesMvc themesMvc;
+
+ @GET
+ @Path("/")
+ public String logout(@Context final UriInfo uriInfo) {
+ subject.logout();
+
+ return themesMvc.getMvcTemplate(uriInfo, "logout");
+ }
+
+}
diff --git a/ccm-core/src/main/resources/themes/ccm-freemarker/logout/loggedout.html.ftl b/ccm-core/src/main/resources/themes/ccm-freemarker/logout/loggedout.html.ftl
new file mode 100644
index 000000000..c126f5956
--- /dev/null
+++ b/ccm-core/src/main/resources/themes/ccm-freemarker/logout/loggedout.html.ftl
@@ -0,0 +1,13 @@
+
+
+
+ Category page
+
+
+
+
+