diff --git a/core/authorize.php b/core/authorize.php
index 22bede6..4c598f6 100644
--- a/core/authorize.php
+++ b/core/authorize.php
@@ -49,8 +49,9 @@
  * @return bool
  *   TRUE if the current user can run authorize.php, and FALSE if not.
  */
-function authorize_access_allowed() {
-  \Drupal::service('session_manager')->start();
+function authorize_access_allowed(Request $request) {
+  $account = \Drupal::service('authentication')->authenticate($request);
+  \Drupal::service('current_user')->setAccount($account);
   return Settings::get('allow_authorize_operations', TRUE) && \Drupal::currentUser()->hasPermission('administer software updates');
 }
 
@@ -72,7 +73,7 @@ function authorize_access_allowed() {
 $show_messages = TRUE;
 
 $response = new Response();
-if (authorize_access_allowed()) {
+if (authorize_access_allowed($request)) {
   // Load both the Form API and Batch API.
   require_once __DIR__ . '/includes/form.inc';
   require_once __DIR__ . '/includes/batch.inc';
diff --git a/core/core.services.yml b/core/core.services.yml
index b0fdda0..496677e 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -503,7 +503,7 @@ services:
     arguments: ['@url_generator', '@module_handler']
   router:
     class: Drupal\Core\Routing\AccessAwareRouter
-    arguments: ['@router.no_access_checks', '@access_manager', '@current_user']
+    arguments: ['@router.no_access_checks', '@access_manager', '@authentication', '@current_user']
   router.dynamic:
     class: Symfony\Cmf\Component\Routing\DynamicRouter
     arguments: ['@router.request_context', '@router.matcher', '@url_generator']
@@ -629,11 +629,6 @@ services:
     tags:
       - { name: route_enhancer }
       - { name: event_subscriber }
-  route_enhancer.authentication:
-    class: Drupal\Core\Routing\Enhancer\AuthenticationEnhancer
-    tags:
-      - { name: route_enhancer, priority: 1000 }
-    arguments: ['@authentication', '@current_user']
   route_enhancer.entity:
     class: Drupal\Core\Entity\Enhancer\EntityRouteEnhancer
     arguments: ['@controller_resolver', '@entity.manager', '@form_builder']
@@ -1011,13 +1006,14 @@ services:
     class: Drupal\Core\EventSubscriber\AuthenticationSubscriber
     tags:
       - { name: event_subscriber }
-    arguments: ['@authentication']
+    arguments: ['@authentication', '@current_user']
   account_switcher:
     class: Drupal\Core\Session\AccountSwitcher
     arguments: ['@current_user', '@session_manager']
   current_user:
     class: Drupal\Core\Session\AccountProxy
-    arguments: ['@authentication', '@request_stack']
+    tags:
+      - { name: persist }
   session_manager:
     class: Drupal\Core\Session\SessionManager
     arguments: ['@request_stack', '@database', '@session_manager.metadata_bag', '@settings']
diff --git a/core/lib/Drupal/Core/Authentication/AuthenticationManager.php b/core/lib/Drupal/Core/Authentication/AuthenticationManager.php
index c4c1df4..822f020 100644
--- a/core/lib/Drupal/Core/Authentication/AuthenticationManager.php
+++ b/core/lib/Drupal/Core/Authentication/AuthenticationManager.php
@@ -171,18 +171,9 @@ protected function filterProviders(array $providers, Request $request) {
     $allowed_providers = array();
     if ($route && $route->hasOption('_auth')) {
       $allowed_providers = $route->getOption('_auth');
+      $providers = array_intersect_key($providers, array_flip($allowed_providers));
     }
-    elseif ($default_provider = $this->defaultProviderId()) {
-      // @todo Mirrors the defective behavior of AuthenticationEnhancer and
-      // restricts the list of allowed providers to the default provider if no
-      // _auth was specified on the current route.
-      //
-      // This restriction will be removed by https://www.drupal.org/node/2286971
-      // See also https://www.drupal.org/node/2283637
-      $allowed_providers = array($default_provider);
-    }
-
-    return array_intersect_key($providers, array_flip($allowed_providers));
+    return $providers;
   }
 
   /**
diff --git a/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php
index 80f7796..ec4ca05 100644
--- a/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php
@@ -8,8 +8,10 @@
 namespace Drupal\Core\EventSubscriber;
 
 use Drupal\Core\Authentication\AuthenticationProviderInterface;
+use Drupal\Core\Session\AccountProxyInterface;
 use Symfony\Component\HttpKernel\HttpKernelInterface;
 use Symfony\Component\HttpKernel\KernelEvents;
+use Symfony\Component\HttpKernel\Event\GetResponseEvent;
 use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
 use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -29,13 +31,23 @@ class AuthenticationSubscriber implements EventSubscriberInterface {
   protected $authenticationProvider;
 
   /**
+   * Current user proxy.
+   *
+   * @var \Drupal\Core\Session\AccountProxyInterface
+   */
+  protected $currentUser;
+
+  /**
    * Keep authentication manager as private variable.
    *
    * @param AuthenticationProviderInterface $authentication_manager
    *   The authentication manager.
+   * @param \Drupal\Core\Session\AccountProxyInterface $current_user
+   *   The current user proxy.
    */
-  public function __construct(AuthenticationProviderInterface $authentication_provider) {
+  public function __construct(AuthenticationProviderInterface $authentication_provider, AccountProxyInterface $current_user) {
     $this->authenticationProvider = $authentication_provider;
+    $this->currentUser = $current_user;
   }
 
   /**
@@ -63,11 +75,6 @@ public function onException(GetResponseForExceptionEvent $event) {
 
   /**
    * {@inheritdoc}
-   *
-   * The priority for request must be higher than the highest event subscriber
-   * accessing the current user.
-   * The priority for the response must be as low as possible allowing e.g the
-   * Cookie provider to send all relevant session data to the user.
    */
   public static function getSubscribedEvents() {
     $events[KernelEvents::RESPONSE][] = ['onRespond', 0];
diff --git a/core/lib/Drupal/Core/Routing/AccessAwareRouter.php b/core/lib/Drupal/Core/Routing/AccessAwareRouter.php
index 93a31c3..1091736 100644
--- a/core/lib/Drupal/Core/Routing/AccessAwareRouter.php
+++ b/core/lib/Drupal/Core/Routing/AccessAwareRouter.php
@@ -8,7 +8,8 @@
 namespace Drupal\Core\Routing;
 
 use Drupal\Core\Access\AccessManagerInterface;
-use Drupal\Core\Session\AccountInterface;
+use Drupal\Core\Authentication\AuthenticationProviderInterface;
+use Drupal\Core\Session\AccountProxyInterface;
 use Symfony\Cmf\Component\Routing\ChainRouter;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
@@ -34,11 +35,18 @@ class AccessAwareRouter implements AccessAwareRouterInterface {
   protected $accessManager;
 
   /**
-   * The account to use in access checks.
+   * Authentication provider.
    *
-   * @var \Drupal\Core\Session\AccountInterface;
+   * @var AuthenticationProviderInterface
    */
-  protected $account;
+  protected $authenticationProvider;
+
+  /**
+   * The account proxy to authenticate and to use in access checks.
+   *
+   * @var \Drupal\Core\Session\AccountProxyInterface;
+   */
+  protected $accountProxy;
 
   /**
    * Constructs a router for Drupal with access check and upcasting.
@@ -47,13 +55,16 @@ class AccessAwareRouter implements AccessAwareRouterInterface {
    *   The chain router doing the actual routing.
    * @param \Drupal\Core\Access\AccessManagerInterface $access_manager
    *   The access manager.
-   * @param \Drupal\Core\Session\AccountInterface $account
-   *   The account to use in access checks.
+   * @param AuthenticationProviderInterface $authentication_provider
+   *   The authentication provider.
+   * @param \Drupal\Core\Session\AccountProxyInterface $account_proxy
+   *   The account proxy to authenticate and to use in access checks.
    */
-  public function __construct(ChainRouter $chain_router, AccessManagerInterface $access_manager, AccountInterface $account) {
+  public function __construct(ChainRouter $chain_router, AccessManagerInterface $access_manager, AuthenticationProviderInterface $authentication_provider, AccountProxyInterface $account_proxy) {
     $this->chainRouter = $chain_router;
     $this->accessManager = $access_manager;
-    $this->account = $account;
+    $this->authenticationProvider = $authentication_provider;
+    $this->accountProxy = $account_proxy;
   }
 
   /**
@@ -88,10 +99,10 @@ public function getContext() {
   public function matchRequest(Request $request) {
     $parameters = $this->chainRouter->matchRequest($request);
     $request->attributes->add($parameters);
-    // Trigger a session start and authentication by accessing any property of
-    // the current user.
-    // @todo This will be removed in https://www.drupal.org/node/2229145.
-    $this->account->id();
+
+    // Authenticate the user.
+    $this->accountProxy->setAccount($this->authenticationProvider->authenticate($request));
+
     $this->checkAccess($request);
     // We can not return $parameters because the access check can change the
     // request attributes.
@@ -105,7 +116,7 @@ public function matchRequest(Request $request) {
    *   The request to access check.
    */
   protected function checkAccess(Request $request) {
-    if (!$this->accessManager->checkRequest($request, $this->account)) {
+    if (!$this->accessManager->checkRequest($request, $this->accountProxy)) {
       throw new AccessDeniedHttpException();
     }
   }
diff --git a/core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php b/core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php
deleted file mode 100644
index 0436b44..0000000
--- a/core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Routing\Enhancer\AuthenticationEnhancer.
- */
-
-namespace Drupal\Core\Routing\Enhancer;
-
-use Drupal\Core\Authentication\AuthenticationManagerInterface;
-use Drupal\Core\Session\AccountProxyInterface;
-use Drupal\Core\Session\AnonymousUserSession;
-use Symfony\Cmf\Component\Routing\Enhancer\RouteEnhancerInterface;
-use Symfony\Component\HttpFoundation\Request;
-use Symfony\Cmf\Component\Routing\RouteObjectInterface;
-
-/**
- * Authentication cleanup for incoming routes.
- *
- * The authentication system happens before routing, so all authentication
- * providers will attempt to authorize a user. However, not all routes allow
- * all authentication mechanisms. Instead, we check if the used provider is
- * valid for the matched route and if not, force the user to anonymous.
- */
-class AuthenticationEnhancer implements RouteEnhancerInterface {
-
-  /**
-   * The authentication manager.
-   *
-   * @var \Drupal\Core\Authentication\AuthenticationManager
-   */
-  protected $manager;
-
-  /**
-   * The current user service.
-   *
-   * @var \Drupal\Core\Session\AccountProxyInterface
-   */
-  protected $currentUser;
-
-  /**
-   * Constructs a AuthenticationEnhancer object.
-   *
-   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $manager
-   *   The authentication manager.
-   * @param \Drupal\Core\Session\AccountProxyInterface $current_user
-   *   The current user service.
-   */
-  function __construct(AuthenticationManagerInterface $manager, AccountProxyInterface $current_user) {
-    $this->manager = $manager;
-    $this->currentUser = $current_user;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function enhance(array $defaults, Request $request) {
-    $auth_provider_triggered = $request->attributes->get('_authentication_provider');
-    if (!empty($auth_provider_triggered)) {
-      $route = isset($defaults[RouteObjectInterface::ROUTE_OBJECT]) ? $defaults[RouteObjectInterface::ROUTE_OBJECT] : NULL;
-
-      $auth_providers = ($route && $route->getOption('_auth')) ? $route->getOption('_auth') : array($this->manager->defaultProviderId());
-      // If the request was authenticated with a non-permitted provider,
-      // force the user back to anonymous.
-      if (!in_array($auth_provider_triggered, $auth_providers)) {
-        $anonymous_user = new AnonymousUserSession();
-
-        $this->currentUser->setAccount($anonymous_user);
-
-        // The global $user object is included for backward compatibility only
-        // and should be considered deprecated.
-        // @todo Remove this line once global $user is no longer used.
-        $GLOBALS['user'] = $anonymous_user;
-      }
-    }
-    return $defaults;
-  }
-}
diff --git a/core/lib/Drupal/Core/Session/AccountProxy.php b/core/lib/Drupal/Core/Session/AccountProxy.php
index f9d0d35..ca671a4 100644
--- a/core/lib/Drupal/Core/Session/AccountProxy.php
+++ b/core/lib/Drupal/Core/Session/AccountProxy.php
@@ -7,9 +7,6 @@
 
 namespace Drupal\Core\Session;
 
-use Drupal\Core\Authentication\AuthenticationManagerInterface;
-use Symfony\Component\HttpFoundation\RequestStack;
-
 /**
  * A proxied implementation of AccountInterface.
  *
@@ -24,20 +21,6 @@
 class AccountProxy implements AccountProxyInterface {
 
   /**
-   * The current request.
-   *
-   * @var \Symfony\Component\HttpFoundation\RequestStack
-   */
-  protected $requestStack;
-
-  /**
-   * The authentication manager.
-   *
-   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
-   */
-  protected $authenticationManager;
-
-  /**
    * The instantiated account.
    *
    * @var \Drupal\Core\Session\AccountInterface
@@ -46,15 +29,9 @@ class AccountProxy implements AccountProxyInterface {
 
   /**
    * Constructs a new AccountProxy.
-   *
-   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $authentication_manager
-   *   The authentication manager.
-   * @param \Symfony\Component\HttpFoundation\Request $request
-   *   The request object used for authenticating.
    */
-  public function __construct(AuthenticationManagerInterface $authentication_manager, RequestStack $requestStack) {
-    $this->authenticationManager = $authentication_manager;
-    $this->requestStack = $requestStack;
+  public function __construct() {
+    $this->account = new AnonymousUserSession();
   }
 
   /**
@@ -73,11 +50,6 @@ public function setAccount(AccountInterface $account) {
    * {@inheritdoc}
    */
   public function getAccount() {
-    if (!isset($this->account)) {
-      // Use the master request to prevent subrequests authenticating to a
-      // different user.
-      $this->setAccount($this->authenticationManager->authenticate($this->requestStack->getMasterRequest()));
-    }
     return $this->account;
   }
 
@@ -187,4 +159,3 @@ public function getLastAccessedTime() {
   }
 
 }
-
diff --git a/core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php b/core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php
index de41c44..cebce3e 100644
--- a/core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php
+++ b/core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php
@@ -17,6 +17,8 @@
 use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
 use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
 use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
+use Symfony\Cmf\Component\Routing\RouteObjectInterface;
+
 
 /**
  * HTTP Basic authentication provider.
@@ -74,9 +76,15 @@ public function __construct(ConfigFactoryInterface $config_factory, UserAuthInte
    * {@inheritdoc}
    */
   public function applies(Request $request) {
-    $username = $request->headers->get('PHP_AUTH_USER');
-    $password = $request->headers->get('PHP_AUTH_PW');
-    return isset($username) && isset($password);
+    // Only allow basic auth when it was specified explicitely on the route.
+    if ($request->attributes->has(RouteObjectInterface::ROUTE_OBJECT)) {
+      $route = $request->attributes->get(RouteObjectInterface::ROUTE_OBJECT);
+      if ($route->hasOption('_auth') && in_array('basic_auth', $route->getOption('_auth'))) {
+        $username = $request->headers->get('PHP_AUTH_USER');
+        $password = $request->headers->get('PHP_AUTH_PW');
+        return isset($username) && isset($password);
+      }
+    }
   }
 
   /**
