diff --git a/typo3/logout.php b/typo3/logout.php
index cdf7766b2ceaac4dc59ba05c44333c7347bc4484..8b57d7d1d80d165b8874682d5f3af5d998286523 100644
--- a/typo3/logout.php
+++ b/typo3/logout.php
@@ -20,5 +20,9 @@
  */
 require __DIR__ . '/init.php';
 
+\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
+	'The entry point to logout was moved to an own module. Please use BackendUtility::getModuleUrl(\'logout\') to link to logout.php. This script will be removed in TYPO3 CMS 8.'
+);
+
 $logoutController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\LogoutController::class);
 $logoutController->logout();
diff --git a/typo3/sysext/backend/Classes/Backend/ToolbarItems/UserToolbarItem.php b/typo3/sysext/backend/Classes/Backend/ToolbarItems/UserToolbarItem.php
index 80816f68cbd0e5b50ce6b93617d16117c317d2a3..ae483b4b4f42fb14af17344a4fa369369e7e5367 100644
--- a/typo3/sysext/backend/Classes/Backend/ToolbarItems/UserToolbarItem.php
+++ b/typo3/sysext/backend/Classes/Backend/ToolbarItems/UserToolbarItem.php
@@ -104,7 +104,7 @@ class UserToolbarItem implements ToolbarItemInterface {
 		// Logout button
 		$buttonLabel = 'LLL:EXT:lang/locallang_core.xlf:' . ($backendUser->user['ses_backuserid'] ? 'buttons.exit' : 'buttons.logout');
 		$dropdown[] = '<li class="reset-dropdown">';
-		$dropdown[] = '<a href="logout.php" class="btn btn-danger pull-right" target="_top"><i class="fa fa-power-off"></i> ';
+		$dropdown[] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('logout')) . '" class="btn btn-danger pull-right" target="_top"><i class="fa fa-power-off"></i> ';
 		$dropdown[] = $languageService->sL($buttonLabel, TRUE);
 		$dropdown[] = '</a>';
 		$dropdown[] = '</li>';
diff --git a/typo3/sysext/backend/Classes/Controller/BackendController.php b/typo3/sysext/backend/Classes/Controller/BackendController.php
index c34cdd39aa409a8fe5b00cd2bd1ceaf34a006efb..a397ff6e86cde9c96a1652c3a45b100c270748ec 100644
--- a/typo3/sysext/backend/Classes/Controller/BackendController.php
+++ b/typo3/sysext/backend/Classes/Controller/BackendController.php
@@ -130,6 +130,7 @@ class BackendController {
 		if (!$this->debug) {
 			$this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LoginRefresh', 'function(LoginRefresh) {
 				LoginRefresh.setLoginFramesetUrl(' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('login_frameset')) . ');
+				LoginRefresh.setLogoutUrl(' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('logout')) . ');
 			}');
 		}
 
diff --git a/typo3/sysext/backend/Classes/View/ModuleMenuView.php b/typo3/sysext/backend/Classes/View/ModuleMenuView.php
index b1fc442e56d9478f96b38a7603209705782e71a4..342e0c700c863e5d1a017198958562c1ba3904ab 100644
--- a/typo3/sysext/backend/Classes/View/ModuleMenuView.php
+++ b/typo3/sysext/backend/Classes/View/ModuleMenuView.php
@@ -357,7 +357,7 @@ class ModuleMenuView {
 	public function renderLogoutButton() {
 		$buttonLabel = $GLOBALS['BE_USER']->user['ses_backuserid'] ? 'LLL:EXT:lang/locallang_core.xlf:buttons.exit' : 'LLL:EXT:lang/locallang_core.xlf:buttons.logout';
 		$buttonForm = '
-		<form action="logout.php" target="_top">
+		<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('logout')) . '" target="_top">
 			<input class="btn btn-default" type="submit" id="logout-submit-button" value="' . $GLOBALS['LANG']->sL($buttonLabel, TRUE) . '" />
 		</form>';
 		return $buttonForm;
diff --git a/typo3/sysext/backend/Modules/Logout/conf.php b/typo3/sysext/backend/Modules/Logout/conf.php
new file mode 100644
index 0000000000000000000000000000000000000000..34db869f578125a01d92b4f8defb167b65b1fe98
--- /dev/null
+++ b/typo3/sysext/backend/Modules/Logout/conf.php
@@ -0,0 +1,3 @@
+<?php
+$MCONF['script'] = '_DISPATCH';
+$MCONF['name'] = 'logout';
\ No newline at end of file
diff --git a/typo3/sysext/backend/Modules/Logout/index.php b/typo3/sysext/backend/Modules/Logout/index.php
new file mode 100644
index 0000000000000000000000000000000000000000..baefe670b59ae0ff5a0d98f102a46b6aad3c1379
--- /dev/null
+++ b/typo3/sysext/backend/Modules/Logout/index.php
@@ -0,0 +1,23 @@
+<?php
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Logout script for the backend
+ * This script saves the interface positions and calls the closeTypo3Windows in the frameset
+ *
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
+ */
+
+$logoutController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\LogoutController::class);
+$logoutController->logout();
\ No newline at end of file
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/LoginRefresh.js b/typo3/sysext/backend/Resources/Public/JavaScript/LoginRefresh.js
index 12fb18ce072371f1b8c8918fc7cd4e3724d9f653..86dbd7fbbc7411cf88055a94f9428021e161b299 100644
--- a/typo3/sysext/backend/Resources/Public/JavaScript/LoginRefresh.js
+++ b/typo3/sysext/backend/Resources/Public/JavaScript/LoginRefresh.js
@@ -34,7 +34,8 @@ define('TYPO3/CMS/Backend/LoginRefresh', ['jquery'], function($) {
 		$timeoutModal: '',
 		$backendLockedModal: '',
 		$loginForm: '',
-		loginFramesetUrl: ''
+		loginFramesetUrl: '',
+		logoutUrl: ''
 	};
 
 	/**
@@ -75,6 +76,13 @@ define('TYPO3/CMS/Backend/LoginRefresh', ['jquery'], function($) {
 		);
 	};
 
+	/**
+	 * Set logout url
+	 */
+	LoginRefresh.setLogoutUrl = function(logoutUrl) {
+		LoginRefresh.logoutUrl = logoutUrl;
+	};
+
 	/**
 	 * Generates the modal displayed on near session time outs
 	 */
@@ -105,7 +113,7 @@ define('TYPO3/CMS/Backend/LoginRefresh', ['jquery'], function($) {
 				});
 			}),
 			$('<button />', {class: 'btn btn-default', 'data-action': 'logout'}).text(TYPO3.LLL.core.refresh_direct_logout_button).on('click', function() {
-				top.location.href = TYPO3.configuration.siteUrl + TYPO3.configuration.TYPO3_mainDir + 'logout.php';
+				top.location.href = TYPO3.configuration.siteUrl + TYPO3.configuration.TYPO3_mainDir + LoginRefresh.logoutUrl;
 			})
 		);
 
@@ -196,7 +204,7 @@ define('TYPO3/CMS/Backend/LoginRefresh', ['jquery'], function($) {
 		LoginRefresh.$loginForm.find('.modal-footer').append(
 			$('<button />', {type: 'submit', form: 'beLoginRefresh', class: 'btn btn-default', 'data-action': 'refreshSession'}).text(TYPO3.LLL.core.refresh_login_button),
 			$('<button />', {class: 'btn btn-default', 'data-action': 'logout'}).text(TYPO3.LLL.core.refresh_direct_logout_button).on('click', function() {
-				top.location.href = TYPO3.configuration.siteUrl + TYPO3.configuration.TYPO3_mainDir + 'logout.php';
+				top.location.href = TYPO3.configuration.siteUrl + TYPO3.configuration.TYPO3_mainDir + LoginRefresh.logoutUrl;
 			})
 		);
 
diff --git a/typo3/sysext/backend/ext_tables.php b/typo3/sysext/backend/ext_tables.php
index 98b0c5706fe49c689f58b447480576a7c5d879e1..52d48b99c7689295d839db1ca57243c1dd0f7745 100644
--- a/typo3/sysext/backend/ext_tables.php
+++ b/typo3/sysext/backend/ext_tables.php
@@ -14,6 +14,12 @@ if (TYPO3_MODE === 'BE') {
 		\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/LoginFrameset/'
 	);
 
+	// Register logout
+	\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
+		'logout',
+		\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/Logout/'
+	);
+
 	// Register file_edit
 	\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
 		'file_edit',
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-65291-DeprecateLogoutEntryPoint.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-65291-DeprecateLogoutEntryPoint.rst
new file mode 100644
index 0000000000000000000000000000000000000000..6308736274ba2e4f427d2c0375a103b52de6aecc
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-65291-DeprecateLogoutEntryPoint.rst
@@ -0,0 +1,25 @@
+==================================================
+Deprecation: #65283 - Deprecate logout entry point
+==================================================
+
+Description
+===========
+
+The following entry point has been marked as deprecated:
+
+* typo3/logout.php
+
+
+Impact
+======
+
+Using this entry points in a backend module will throw a deprecation message.
+
+
+Migration
+=========
+
+Use ``\TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl()`` instead with the according module name.
+
+typo3/logout.php
+``\TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('logout')``
\ No newline at end of file