diff --git a/core/core.services.yml b/core/core.services.yml
index 402d6ee..511b55e 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -101,7 +101,7 @@ services:
     arguments: ['@config.storage', '@config.storage.schema', '@cache.config']
   cron:
     class: Drupal\Core\Cron
-    arguments: ['@module_handler', '@lock', '@queue', '@state']
+    arguments: ['@module_handler', '@lock', '@queue', '@state', '@authentication']
   database:
     class: Drupal\Core\Database\Connection
     factory_class: Drupal\Core\Database\Database
@@ -205,13 +205,13 @@ services:
     arguments: ['@container.namespaces']
   plugin.manager.menu.local_action:
     class: Drupal\Core\Menu\LocalActionManager
-    arguments: ['@controller_resolver', '@request', '@router.route_provider', '@module_handler', '@cache.cache', '@language_manager', '@access_manager', '@current_user']
+    arguments: ['@controller_resolver', '@request', '@router.route_provider', '@module_handler', '@cache.cache', '@language_manager', '@access_manager', '@authentication']
   plugin.manager.menu.local_task:
     class: Drupal\Core\Menu\LocalTaskManager
-    arguments: ['@controller_resolver', '@request', '@router.route_provider', '@module_handler', '@cache.cache', '@language_manager', '@access_manager', '@current_user']
+    arguments: ['@controller_resolver', '@request', '@router.route_provider', '@module_handler', '@cache.cache', '@language_manager', '@access_manager', '@authentication']
   plugin.manager.menu.contextual_link:
     class: Drupal\Core\Menu\ContextualLinkManager
-    arguments: ['@controller_resolver', '@module_handler', '@cache.cache', '@language_manager', '@access_manager', '@current_user']
+    arguments: ['@controller_resolver', '@module_handler', '@cache.cache', '@language_manager', '@access_manager', '@authentication']
   request:
     class: Symfony\Component\HttpFoundation\Request
     synthetic: true
@@ -375,8 +375,6 @@ services:
       - { name: event_subscriber }
   route_enhancer.authentication:
     class: Drupal\Core\Routing\Enhancer\AuthenticationEnhancer
-    calls:
-      - [setContainer, ['@service_container']]
     tags:
       - { name: route_enhancer, priority: 1000 }
     arguments: ['@authentication']
@@ -442,9 +440,7 @@ services:
     arguments: ['@state']
   csrf_token:
     class: Drupal\Core\Access\CsrfTokenGenerator
-    arguments: ['@private_key']
-    calls:
-      - [setCurrentUser, ['@?current_user']]
+    arguments: ['@private_key', '@authentication']
   access_manager:
     class: Drupal\Core\Access\AccessManager
     arguments: ['@router.route_provider', '@url_generator', '@paramconverter_manager']
@@ -453,9 +449,7 @@ services:
       - [setRequest, ['@?request']]
   access_subscriber:
     class: Drupal\Core\EventSubscriber\AccessSubscriber
-    arguments: ['@access_manager', '@current_user']
-    calls:
-      - [setCurrentUser, ['@?current_user']]
+    arguments: ['@access_manager', '@authentication']
     tags:
       - { name: event_subscriber }
   access_route_subscriber:
@@ -684,12 +678,6 @@ services:
     tags:
       - { name: event_subscriber }
     arguments: ['@authentication']
-  current_user:
-    class: Drupal\Core\Session\AccountInterface
-    factory_method: authenticate
-    factory_service: authentication
-    arguments: ['@request']
-    synchronized: true
   asset.css.collection_renderer:
     class: Drupal\Core\Asset\CssCollectionRenderer
     arguments: [ '@state' ]
diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php
index 0ec88d7..6a803d8 100644
--- a/core/lib/Drupal.php
+++ b/core/lib/Drupal.php
@@ -163,7 +163,7 @@ public static function request() {
    * @return \Drupal\Core\Session\AccountInterface
    */
   public static function currentUser() {
-    return static::$container->get('current_user');
+    return static::$container->get('authentication')->getAccount();
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Access/CsrfTokenGenerator.php b/core/lib/Drupal/Core/Access/CsrfTokenGenerator.php
index f2b015c..7a6fbce 100644
--- a/core/lib/Drupal/Core/Access/CsrfTokenGenerator.php
+++ b/core/lib/Drupal/Core/Access/CsrfTokenGenerator.php
@@ -8,6 +8,7 @@
 namespace Drupal\Core\Access;
 
 use Drupal\Component\Utility\Crypt;
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\PrivateKey;
 use Drupal\Core\Session\AccountInterface;
 
@@ -26,30 +27,23 @@ class CsrfTokenGenerator {
   protected $privateKey;
 
   /**
-   * The current user.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $currentUser;
+  protected $authManager;
 
   /**
    * Constructs the token generator.
    *
    * @param \Drupal\Core\PrivateKey $private_key
    *   The private key service.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    */
-  public function __construct(PrivateKey $private_key) {
+  public function __construct(PrivateKey $private_key, AuthenticationManagerInterface $auth_manager) {
     $this->privateKey = $private_key;
-  }
-
-  /**
-   * Sets the current user.
-   *
-   * @param \Drupal\Core\Session\AccountInterface|null $current_user
-   *  The current user service.
-   */
-  public function setCurrentUser(AccountInterface $current_user = NULL) {
-    $this->currentUser = $current_user;
+    $this->authManager = $auth_manager;
   }
 
   /**
@@ -84,7 +78,7 @@ public function get($value = '') {
    *   is TRUE, the return value will always be TRUE for anonymous users.
    */
   public function validate($token, $value = '', $skip_anonymous = FALSE) {
-    return ($skip_anonymous && $this->currentUser->isAnonymous()) || ($token === $this->get($value));
+    return ($skip_anonymous && $this->authManager->getAccount()->isAnonymous()) || ($token === $this->get($value));
   }
 
 }
diff --git a/core/lib/Drupal/Core/Authentication/AuthenticationManager.php b/core/lib/Drupal/Core/Authentication/AuthenticationManager.php
index d3630c4..7f6821e 100644
--- a/core/lib/Drupal/Core/Authentication/AuthenticationManager.php
+++ b/core/lib/Drupal/Core/Authentication/AuthenticationManager.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\Core\Authentication;
 
+use Drupal\Core\Session\AccountInterface;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
 use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
@@ -54,6 +55,13 @@ class AuthenticationManager implements AuthenticationProviderInterface, Authenti
   protected $triggeredProviderId = '';
 
   /**
+   * The current user account.
+   *
+   * @var \Drupal\Core\Session\AccountInterface
+   */
+  protected $currentAccount;
+
+  /**
    * Adds a provider to the array of registered providers.
    *
    * @param string $provider_id
@@ -83,8 +91,6 @@ public function applies(Request $request) {
    * {@inheritdoc}
    */
   public function authenticate(Request $request) {
-    global $user;
-
     $account = NULL;
 
     // Iterate the availlable providers.
@@ -112,9 +118,12 @@ public function authenticate(Request $request) {
     //  for later access.
     $request->attributes->set('_authentication_provider', $this->triggeredProviderId);
 
+    $this->currentAccount = $account;
+
     // 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.
+    global $user;
     $user = $account;
 
     return $account;
@@ -135,6 +144,29 @@ public function defaultProviderId() {
   }
 
   /**
+   * {@inheritdoc}
+   */
+  public function getAccount() {
+    // Set the current account to anonymous if the current account has been
+    // requested but no authentication providers have authenticated an account.
+    // As well as times when the request may not be set, like during
+    // rebuild.php.
+    if (empty($this->currentAccount)) {
+      $this->currentAccount = drupal_anonymous_user();
+    }
+
+    return $this->currentAccount;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setAccount(AccountInterface $account) {
+    $this->currentAccount = $account;
+  }
+
+
+  /**
    * Returns the sorted array of authentication providers.
    *
    * @return array
diff --git a/core/lib/Drupal/Core/Authentication/AuthenticationManagerInterface.php b/core/lib/Drupal/Core/Authentication/AuthenticationManagerInterface.php
index b547edd..24a0084 100644
--- a/core/lib/Drupal/Core/Authentication/AuthenticationManagerInterface.php
+++ b/core/lib/Drupal/Core/Authentication/AuthenticationManagerInterface.php
@@ -7,6 +7,8 @@
 
 namespace Drupal\Core\Authentication;
 
+use Drupal\Core\Session\AccountInterface;
+
 /**
  * Defines an interface for authentication managers.
  */
@@ -19,4 +21,21 @@
    *   The service id of the default authentication provider.
    */
   public function defaultProviderId();
+
+  /**
+   * Gets the current user account.
+   *
+   * @return \Drupal\Core\Session\UserSession
+   *   The current account.
+   */
+  public function getAccount();
+
+  /**
+   * Sets the current user account.
+   *
+   * @param \Drupal\Core\Session\AccountInterface $account
+   *   The account to set.
+   */
+  public function setAccount(AccountInterface $user);
+
 }
diff --git a/core/lib/Drupal/Core/Controller/ControllerBase.php b/core/lib/Drupal/Core/Controller/ControllerBase.php
index 23a2cac..5900a96 100644
--- a/core/lib/Drupal/Core/Controller/ControllerBase.php
+++ b/core/lib/Drupal/Core/Controller/ControllerBase.php
@@ -241,7 +241,7 @@ public function l($text, $route_name, array $parameters = array(), array $option
    */
   protected function currentUser() {
     if (!$this->currentUser) {
-      $this->currentUser = $this->container()->get('current_user');
+      $this->currentUser = $this->container()->get('authentication')->getAccount();
     }
     return $this->currentUser;
   }
diff --git a/core/lib/Drupal/Core/Cron.php b/core/lib/Drupal/Core/Cron.php
index 1fe9727..b3eed83 100644
--- a/core/lib/Drupal/Core/Cron.php
+++ b/core/lib/Drupal/Core/Cron.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\Core;
 
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\KeyValueStore\StateInterface;
 use Drupal\Core\Lock\LockBackendInterface;
@@ -47,6 +48,13 @@ class Cron implements CronInterface {
   protected $state;
 
   /**
+   * The auth manager.
+   *
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
+   */
+  protected $authManager;
+
+  /**
    * Constructs a cron object.
    *
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
@@ -57,12 +65,15 @@ class Cron implements CronInterface {
    *   The queue service.
    * @param \Drupal\Core\KeyValueStore\StateInterface $state
    *   The state service.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface
+   *   The auth manager.
    */
-  public function __construct(ModuleHandlerInterface $module_handler, LockBackendInterface $lock, QueueFactory $queue_factory, StateInterface $state) {
+  public function __construct(ModuleHandlerInterface $module_handler, LockBackendInterface $lock, QueueFactory $queue_factory, StateInterface $state, AuthenticationManagerInterface $auth_manager) {
     $this->moduleHandler = $module_handler;
     $this->lock = $lock;
     $this->queueFactory = $queue_factory;
     $this->state = $state;
+    $this->authManager = $auth_manager;
   }
 
   /**
@@ -78,10 +89,10 @@ public function run() {
 
     // Force the current user to anonymous to ensure consistent permissions on
     // cron runs.
-    // @todo This currently does not work, as it will not affect the current
-    //   user being injected into services.
-    $original_user = $GLOBALS['user'];
-    $GLOBALS['user'] = new UserSession();
+    $original_user = $this->authManager->getAccount();
+    $anonymous = new UserSession();
+    $this->authManager->setAccount($anonymous);
+    $GLOBALS['user'] = $anonymous;
 
     // Try to allocate enough time to run all the hook_cron implementations.
     drupal_set_time_limit(240);
@@ -147,9 +158,9 @@ public function run() {
     }
 
     // Restore the user.
-    // @todo This currently does not work, as it will not affect the current
-    //   user being injected into services.
     $GLOBALS['user'] = $original_user;
+    $this->authManager->setAccount($original_user);
+
     drupal_save_session($original_session_saving);
 
     return $return;
diff --git a/core/lib/Drupal/Core/EventSubscriber/AccessSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/AccessSubscriber.php
index 0c31999..977a7c2 100644
--- a/core/lib/Drupal/Core/EventSubscriber/AccessSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/AccessSubscriber.php
@@ -8,6 +8,7 @@
 namespace Drupal\Core\EventSubscriber;
 
 use Drupal\Core\Access\AccessManager;
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Session\AccountInterface;
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
 use Symfony\Component\HttpKernel\KernelEvents;
@@ -22,11 +23,11 @@
 class AccessSubscriber implements EventSubscriberInterface {
 
   /**
-   * The current user.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $currentUser;
+  protected $authManager;
 
   /**
    * The access manager.
@@ -41,12 +42,12 @@ class AccessSubscriber implements EventSubscriberInterface {
    * @param \Drupal\Core\Access\AccessManager $access_manager
    *   The access check manager that will be responsible for applying
    *   AccessCheckers against routes.
-   * @param \Drupal\Core\Session\AccountInterface $current_user
-   *   The current user.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    */
-  public function __construct(AccessManager $access_manager, AccountInterface $current_user) {
+  public function __construct(AccessManager $access_manager, AuthenticationManagerInterface $auth_manager) {
     $this->accessManager = $access_manager;
-    $this->currentUser = $current_user;
+    $this->authManager = $auth_manager;
   }
 
   /**
@@ -74,7 +75,7 @@ public function onKernelRequestAccessCheck(GetResponseEvent $event) {
     // Wrap this in a try/catch to ensure the '_controller_request' attribute
     // can always be removed.
     try {
-      $access = $this->accessManager->check($request->attributes->get(RouteObjectInterface::ROUTE_OBJECT), $request, $this->currentUser);
+      $access = $this->accessManager->check($request->attributes->get(RouteObjectInterface::ROUTE_OBJECT), $request, $this->authManager->getAccount());
     }
     catch (\Exception $e) {
       $request->attributes->remove('_controller_request');
@@ -89,16 +90,6 @@ public function onKernelRequestAccessCheck(GetResponseEvent $event) {
   }
 
   /**
-   * Sets the current user.
-   *
-   * @param \Drupal\Core\Session\AccountInterface|null $current_user
-   *  The current user service.
-   */
-  public function setCurrentUser(AccountInterface $current_user = NULL) {
-    $this->currentUser = $current_user;
-  }
-
-  /**
    * Registers the methods in this class that should be listeners.
    *
    * @return array
diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php
index 43d15a6..57339f9 100644
--- a/core/lib/Drupal/Core/Form/FormBuilder.php
+++ b/core/lib/Drupal/Core/Form/FormBuilder.php
@@ -1810,7 +1810,7 @@ protected function drupalStaticReset($name = NULL) {
    */
   protected function currentUser() {
     if (!$this->currentUser) {
-      if (\Drupal::getContainer()->has('current_user')) {
+      if (\Drupal::getContainer()->has('authentication')) {
         $this->currentUser = \Drupal::currentUser();
       }
       else {
diff --git a/core/lib/Drupal/Core/Menu/ContextualLinkManager.php b/core/lib/Drupal/Core/Menu/ContextualLinkManager.php
index 5141f5c..106aab0 100644
--- a/core/lib/Drupal/Core/Menu/ContextualLinkManager.php
+++ b/core/lib/Drupal/Core/Menu/ContextualLinkManager.php
@@ -9,6 +9,7 @@
 
 use Drupal\Component\Plugin\Exception\PluginException;
 use Drupal\Core\Access\AccessManager;
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Controller\ControllerResolverInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
@@ -17,7 +18,6 @@
 use Drupal\Core\Plugin\Discovery\ContainerDerivativeDiscoveryDecorator;
 use Drupal\Core\Plugin\Discovery\YamlDiscovery;
 use Drupal\Core\Plugin\Factory\ContainerFactory;
-use Drupal\Core\Session\AccountInterface;
 
 /**
  * Defines a contextual link plugin manager to deal with contextual links.
@@ -63,11 +63,11 @@ class ContextualLinkManager extends DefaultPluginManager implements ContextualLi
   protected $accessManager;
 
   /**
-   * The current user.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $account;
+  protected $authManager;
 
   /**
    * A static cache of all the contextual link plugins by group name.
@@ -89,17 +89,17 @@ class ContextualLinkManager extends DefaultPluginManager implements ContextualLi
    *   The language manager.
    * @param \Drupal\Core\Access\AccessManager $access_manager
    *   The access manager.
-   * @param \Drupal\Core\Session\AccountInterface $account
-   *   The current user.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    */
-  public function __construct(ControllerResolverInterface $controller_resolver, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, LanguageManager $language_manager, AccessManager $access_manager, AccountInterface $account) {
+  public function __construct(ControllerResolverInterface $controller_resolver, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, LanguageManager $language_manager, AccessManager $access_manager, AuthenticationManagerInterface $auth_manager) {
     $this->discovery = new YamlDiscovery('contextual_links', $module_handler->getModuleDirectories());
     $this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
     $this->factory = new ContainerFactory($this);
 
     $this->controllerResolver = $controller_resolver;
     $this->accessManager = $access_manager;
-    $this->account = $account;
+    $this->authManager = $auth_manager;
     $this->alterInfo($module_handler, 'contextual_links_plugins');
     $this->setCacheBackend($cache_backend, $language_manager, 'contextual_links_plugins');
   }
@@ -155,7 +155,7 @@ public function getContextualLinksArrayByGroup($group_name, array $route_paramet
       $route_name = $plugin->getRouteName();
 
       // Check access.
-      if (!$this->accessManager->checkNamedRoute($route_name, $route_parameters, $this->account)) {
+      if (!$this->accessManager->checkNamedRoute($route_name, $route_parameters, $this->authManager->getAccount())) {
         continue;
       }
 
diff --git a/core/lib/Drupal/Core/Menu/LocalActionManager.php b/core/lib/Drupal/Core/Menu/LocalActionManager.php
index 32ae80e..84f6c59 100644
--- a/core/lib/Drupal/Core/Menu/LocalActionManager.php
+++ b/core/lib/Drupal/Core/Menu/LocalActionManager.php
@@ -20,7 +20,7 @@
 use Drupal\Core\Routing\RouteProviderInterface;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
-use Drupal\Core\Session\AccountInterface;
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 
 /**
  * Manages discovery and instantiation of menu local action plugins.
@@ -85,11 +85,11 @@ class LocalActionManager extends DefaultPluginManager {
   protected $accessManager;
 
   /**
-   * The current user.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $account;
+  protected $authManager;
 
 /**
    * The plugin instances.
@@ -116,8 +116,10 @@ class LocalActionManager extends DefaultPluginManager {
    *   The language manager.
    * @param \Drupal\Core\Access\AccessManager $access_manager
    *   The access manager.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    */
-  public function __construct(ControllerResolverInterface $controller_resolver, Request $request, RouteProviderInterface $route_provider, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, LanguageManager $language_manager, AccessManager $access_manager, AccountInterface $account) {
+  public function __construct(ControllerResolverInterface $controller_resolver, Request $request, RouteProviderInterface $route_provider, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, LanguageManager $language_manager, AccessManager $access_manager, AuthenticationManagerInterface $auth_manager) {
     // Skip calling the parent constructor, since that assumes annotation-based
     // discovery.
     $this->discovery = new YamlDiscovery('local_actions', $module_handler->getModuleDirectories());
@@ -125,7 +127,7 @@ public function __construct(ControllerResolverInterface $controller_resolver, Re
     $this->factory = new ContainerFactory($this);
     $this->routeProvider = $route_provider;
     $this->accessManager = $access_manager;
-    $this->account = $account;
+    $this->authManager = $auth_manager;
     $this->controllerResolver = $controller_resolver;
     $this->request = $request;
     $this->alterInfo($module_handler, 'menu_local_actions');
@@ -190,7 +192,7 @@ public function getActionsForRoute($route_appears) {
           'route_parameters' => $route_parameters,
           'localized_options' => $plugin->getOptions($this->request),
         ),
-        '#access' => $this->accessManager->checkNamedRoute($route_name, $route_parameters, $this->account),
+        '#access' => $this->accessManager->checkNamedRoute($route_name, $route_parameters, $this->authManager->getAccount()),
         '#weight' => $plugin->getWeight(),
       );
     }
diff --git a/core/lib/Drupal/Core/Menu/LocalTaskManager.php b/core/lib/Drupal/Core/Menu/LocalTaskManager.php
index a436d57..f090fee 100644
--- a/core/lib/Drupal/Core/Menu/LocalTaskManager.php
+++ b/core/lib/Drupal/Core/Menu/LocalTaskManager.php
@@ -9,6 +9,7 @@
 
 use Drupal\Component\Plugin\Exception\PluginException;
 use Drupal\Core\Access\AccessManager;
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Controller\ControllerResolverInterface;
@@ -19,7 +20,6 @@
 use Drupal\Core\Plugin\Discovery\YamlDiscovery;
 use Drupal\Core\Plugin\Factory\ContainerFactory;
 use Drupal\Core\Routing\RouteProviderInterface;
-use Drupal\Core\Session\AccountInterface;
 use Symfony\Component\HttpFoundation\Request;
 
 /**
@@ -91,11 +91,11 @@ class LocalTaskManager extends DefaultPluginManager {
   protected $accessManager;
 
   /**
-   * The current user.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $account;
+  protected $authManager;
 
   /**
    * Constructs a \Drupal\Core\Menu\LocalTaskManager object.
@@ -114,10 +114,10 @@ class LocalTaskManager extends DefaultPluginManager {
    *   The language manager.
    * @param \Drupal\Core\Access\AccessManager $access_manager
    *   The access manager.
-   * @param \Drupal\Core\Session\AccountInterface $account
-   *   The current user.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    */
-  public function __construct(ControllerResolverInterface $controller_resolver, Request $request, RouteProviderInterface $route_provider, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache, LanguageManager $language_manager, AccessManager $access_manager, AccountInterface $account) {
+  public function __construct(ControllerResolverInterface $controller_resolver, Request $request, RouteProviderInterface $route_provider, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache, LanguageManager $language_manager, AccessManager $access_manager, AuthenticationManagerInterface $auth_manager) {
     $this->discovery = new YamlDiscovery('local_tasks', $module_handler->getModuleDirectories());
     $this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
     $this->factory = new ContainerFactory($this);
@@ -125,7 +125,7 @@ public function __construct(ControllerResolverInterface $controller_resolver, Re
     $this->request = $request;
     $this->routeProvider = $route_provider;
     $this->accessManager = $access_manager;
-    $this->account = $account;
+    $this->authManager = $auth_manager;
     $this->alterInfo($module_handler, 'local_tasks');
     $this->setCacheBackend($cache, $language_manager, 'local_task_plugins', array('local_task' => TRUE));
   }
@@ -286,7 +286,7 @@ public function getTasksBuild($current_route_name) {
         $route_parameters = $child->getRouteParameters($this->request);
 
         // Find out whether the user has access to the task.
-        $access = $this->accessManager->checkNamedRoute($route_name, $route_parameters, $this->account);
+        $access = $this->accessManager->checkNamedRoute($route_name, $route_parameters, $this->authManager->getAccount());
         if ($access) {
           $active = $this->isRouteActive($current_route_name, $route_name, $route_parameters);
 
diff --git a/core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php b/core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php
index 6e577b9..b99fd58 100644
--- a/core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php
+++ b/core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php
@@ -9,7 +9,6 @@
 
 use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Symfony\Cmf\Component\Routing\Enhancer\RouteEnhancerInterface;
-use Symfony\Component\DependencyInjection\ContainerAware;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
 
@@ -21,7 +20,7 @@
  * 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 extends ContainerAware implements RouteEnhancerInterface {
+class AuthenticationEnhancer implements RouteEnhancerInterface {
 
   /**
    * The authentication manager.
@@ -54,7 +53,7 @@ public function enhance(array $defaults, Request $request) {
       if (!in_array($auth_provider_triggered, $auth_providers)) {
         $anonymous_user = drupal_anonymous_user();
 
-        $this->container->set('current_user', $anonymous_user, 'request');
+        $this->manager->setAccount($anonymous_user);
 
         // The global $user object is included for backward compatibility only
         // and should be considered deprecated.
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
index fe7f461..df10893 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
@@ -8,9 +8,9 @@
 namespace Drupal\custom_block\Plugin\Block;
 
 use Drupal\block\BlockBase;
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
-use Drupal\Core\Session\AccountInterface;
 use Drupal\block\Plugin\Type\BlockManager;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -41,11 +41,11 @@ class CustomBlockBlock extends BlockBase implements ContainerFactoryPluginInterf
   protected $moduleHandler;
 
   /**
-   * The Drupal account to use for checking for access to block.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface.
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $account;
+  protected $authManager;
 
   /**
    * Constructs a new CustomBlockBlock.
@@ -60,15 +60,15 @@ class CustomBlockBlock extends BlockBase implements ContainerFactoryPluginInterf
    *   The Plugin Block Manager.
    * @param \Drupal\Core\Extension\ModuleHandlerInterface
    *   The Module Handler.
-   * @param \Drupal\Core\Session\AccountInterface $account
-   *   The account for which view access should be checked.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, BlockManager $block_manager, ModuleHandlerInterface $module_handler, AccountInterface $account) {
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, BlockManager $block_manager, ModuleHandlerInterface $module_handler, AuthenticationManagerInterface $auth_manager) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 
     $this->blockManager = $block_manager;
     $this->moduleHandler = $module_handler;
-    $this->account = $account;
+    $this->authManager = $auth_manager;
   }
 
   /**
@@ -81,7 +81,7 @@ public static function create(ContainerInterface $container, array $configuratio
       $plugin_definition,
       $container->get('plugin.manager.block'),
       $container->get('module_handler'),
-      $container->get('current_user')
+      $container->get('authentication')
     );
   }
 
@@ -143,7 +143,7 @@ public function build() {
           '%uuid' => $uuid,
           '!url' => url('block/add')
         )),
-        '#access' => $this->account->hasPermission('administer blocks')
+        '#access' => $this->authManager->getAccount()->hasPermission('administer blocks')
       );
     }
   }
diff --git a/core/modules/book/book.services.yml b/core/modules/book/book.services.yml
index daa995a..5e7493a 100644
--- a/core/modules/book/book.services.yml
+++ b/core/modules/book/book.services.yml
@@ -1,7 +1,7 @@
 services:
   book.breadcrumb:
     class: Drupal\book\BookBreadcrumbBuilder
-    arguments: ['@entity.manager', '@access_manager', '@current_user']
+    arguments: ['@entity.manager', '@access_manager', '@authentication']
     tags:
       - { name: breadcrumb_builder, priority: 701 }
   book.manager:
diff --git a/core/modules/book/lib/Drupal/book/BookBreadcrumbBuilder.php b/core/modules/book/lib/Drupal/book/BookBreadcrumbBuilder.php
index 6dd54ff..fcdeea6 100644
--- a/core/modules/book/lib/Drupal/book/BookBreadcrumbBuilder.php
+++ b/core/modules/book/lib/Drupal/book/BookBreadcrumbBuilder.php
@@ -8,6 +8,7 @@
 namespace Drupal\book;
 
 use Drupal\Core\Access\AccessManager;
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Breadcrumb\BreadcrumbBuilderBase;
 use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Session\AccountInterface;
@@ -33,11 +34,11 @@ class BookBreadcrumbBuilder extends BreadcrumbBuilderBase {
   protected $accessManager;
 
   /**
-   * The current user account.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $account;
+  protected $authManager;
 
   /**
    * Constructs the BookBreadcrumbBuilder.
@@ -46,13 +47,13 @@ class BookBreadcrumbBuilder extends BreadcrumbBuilderBase {
    *   The entity manager service.
    * @param \Drupal\Core\Access\AccessManager $access_manager
    *   The access manager.
-   * @param \Drupal\Core\Session\AccountInterface $account
-   *   The current user account.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    */
-  public function __construct(EntityManagerInterface $entity_manager, AccessManager $access_manager, AccountInterface $account) {
+  public function __construct(EntityManagerInterface $entity_manager, AccessManager $access_manager, AuthenticationManagerInterface $auth_manager) {
     $this->menuLinkStorage = $entity_manager->getStorageController('menu_link');
     $this->accessManager = $access_manager;
-    $this->account = $account;
+    $this->authManager = $auth_manager;
   }
 
   /**
@@ -82,7 +83,7 @@ public function build(array $attributes) {
       $depth = 1;
       while (!empty($book['p' . ($depth + 1)])) {
         if (!empty($menu_links[$book['p' . $depth]]) && ($menu_link = $menu_links[$book['p' . $depth]])) {
-          if ($this->accessManager->checkNamedRoute($menu_link->route_name, $menu_link->route_parameters, $this->account)) {
+          if ($this->accessManager->checkNamedRoute($menu_link->route_name, $menu_link->route_parameters, $this->authManager->getAccount())) {
             $links[] = $this->l($menu_link->label(), $menu_link->route_name, $menu_link->route_parameters, $menu_link->options);
           }
         }
diff --git a/core/modules/comment/comment.services.yml b/core/modules/comment/comment.services.yml
index bcfb009..809344f 100644
--- a/core/modules/comment/comment.services.yml
+++ b/core/modules/comment/comment.services.yml
@@ -7,7 +7,7 @@ services:
 
   comment.manager:
     class: Drupal\comment\CommentManager
-    arguments: ['@field.info', '@entity.manager', '@current_user', '@config.factory', '@string_translation', '@url_generator']
+    arguments: ['@field.info', '@entity.manager', '@authentication', '@config.factory', '@string_translation', '@url_generator']
 
   comment.route_enhancer:
       class: Drupal\comment\Routing\CommentBundleEnhancer
diff --git a/core/modules/comment/lib/Drupal/comment/CommentFormController.php b/core/modules/comment/lib/Drupal/comment/CommentFormController.php
index c5afeeb..dbc860b 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentFormController.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentFormController.php
@@ -9,12 +9,12 @@
 
 use Drupal\Component\Utility\String;
 use Drupal\Component\Utility\Unicode;
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\Datetime\DrupalDateTime;
 use Drupal\Core\Entity\ContentEntityFormController;
 use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Language\Language;
-use Drupal\Core\Session\AccountInterface;
 use Drupal\field\FieldInfo;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -31,13 +31,20 @@ class CommentFormController extends ContentEntityFormController {
   protected $fieldInfo;
 
   /**
+   * The authentication manager.
+   *
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
+   */
+  protected $authManager;
+
+  /**
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container) {
     return new static(
       $container->get('entity.manager'),
       $container->get('field.info'),
-      $container->get('current_user')
+      $container->get('authentication')
     );
   }
 
@@ -48,13 +55,13 @@ public static function create(ContainerInterface $container) {
    *   The entity manager service.
    * @param \Drupal\field\FieldInfo $field_info
    *   The field info service.
-   * @param \Drupal\Core\Session\AccountInterface $current_user
-   *   The current user.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    */
-  public function __construct(EntityManagerInterface $entity_manager, FieldInfo $field_info, AccountInterface $current_user) {
+  public function __construct(EntityManagerInterface $entity_manager, FieldInfo $field_info, AuthenticationManagerInterface $auth_manager) {
     parent::__construct($entity_manager);
     $this->fieldInfo = $field_info;
-    $this->currentUser = $current_user;
+    $this->authManager = $auth_manager;
   }
 
   /**
@@ -81,15 +88,16 @@ public function form(array $form, array &$form_state) {
     $entity = $this->entityManager->getStorageController($comment->entity_type->value)->load($comment->entity_id->value);
     $field_name = $comment->field_name->value;
     $instance = $this->fieldInfo->getInstance($entity->entityType(), $entity->bundle(), $field_name);
+    $current_user = $this->authManager->getAccount();
 
     // Use #comment-form as unique jump target, regardless of entity type.
     $form['#id'] = drupal_html_id('comment_form');
     $form['#theme'] = array('comment_form__' . $entity->entityType() . '__' . $entity->bundle() . '__' . $field_name, 'comment_form');
 
     $anonymous_contact = $instance->getSetting('anonymous');
-    $is_admin = $comment->id() && $this->currentUser->hasPermission('administer comments');
+    $is_admin = $comment->id() && $current_user->hasPermission('administer comments');
 
-    if (!$this->currentUser->isAuthenticated() && $anonymous_contact != COMMENT_ANONYMOUS_MAYNOT_CONTACT) {
+    if (!$current_user->isAuthenticated() && $anonymous_contact != COMMENT_ANONYMOUS_MAYNOT_CONTACT) {
       $form['#attached']['library'][] = array('system', 'jquery.cookie');
       $form['#attributes']['class'][] = 'user-info-from-cookie';
     }
@@ -125,13 +133,13 @@ public function form(array $form, array &$form_state) {
       }
     }
     else {
-      if ($this->currentUser->isAuthenticated()) {
-        $author = $this->currentUser->getUsername();
+      if ($current_user->isAuthenticated()) {
+        $author = $current_user->getUsername();
       }
       else {
         $author = ($comment->name->value ? $comment->name->value : '');
       }
-      $status = ($this->currentUser->hasPermission('skip comment approval') ? CommentInterface::PUBLISHED : CommentInterface::NOT_PUBLISHED);
+      $status = ($current_user->hasPermission('skip comment approval') ? CommentInterface::PUBLISHED : CommentInterface::NOT_PUBLISHED);
     }
 
     $date = '';
@@ -144,7 +152,7 @@ public function form(array $form, array &$form_state) {
       '#type' => 'textfield',
       '#title' => $this->t('Your name'),
       '#default_value' => $author,
-      '#required' => ($this->currentUser->isAnonymous() && $anonymous_contact == COMMENT_ANONYMOUS_MUST_CONTACT),
+      '#required' => ($current_user->isAnonymous() && $anonymous_contact == COMMENT_ANONYMOUS_MUST_CONTACT),
       '#maxlength' => 60,
       '#size' => 30,
     );
@@ -153,11 +161,11 @@ public function form(array $form, array &$form_state) {
       $form['author']['name']['#description'] = $this->t('Leave blank for %anonymous.', array('%anonymous' => $this->config('user.settings')->get('anonymous')));
       $form['author']['name']['#autocomplete_route_name'] = 'user.autocomplete';
     }
-    elseif ($this->currentUser->isAuthenticated()) {
+    elseif ($current_user->isAuthenticated()) {
       $form['author']['name']['#type'] = 'item';
       $form['author']['name']['#value'] = $form['author']['name']['#default_value'];
       $form['author']['name']['#theme'] = 'username';
-      $form['author']['name']['#account'] = $this->currentUser;
+      $form['author']['name']['#account'] = $current_user;
     }
 
     // Add author e-mail and homepage fields depending on the current user.
@@ -165,11 +173,11 @@ public function form(array $form, array &$form_state) {
       '#type' => 'email',
       '#title' => $this->t('E-mail'),
       '#default_value' => $comment->mail->value,
-      '#required' => ($this->currentUser->isAnonymous() && $anonymous_contact == COMMENT_ANONYMOUS_MUST_CONTACT),
+      '#required' => ($current_user->isAnonymous() && $anonymous_contact == COMMENT_ANONYMOUS_MUST_CONTACT),
       '#maxlength' => 64,
       '#size' => 30,
       '#description' => $this->t('The content of this field is kept private and will not be shown publicly.'),
-      '#access' => $is_admin || ($this->currentUser->isAnonymous() && $anonymous_contact != COMMENT_ANONYMOUS_MAYNOT_CONTACT),
+      '#access' => $is_admin || ($current_user->isAnonymous() && $anonymous_contact != COMMENT_ANONYMOUS_MAYNOT_CONTACT),
     );
 
     $form['author']['homepage'] = array(
@@ -178,7 +186,7 @@ public function form(array $form, array &$form_state) {
       '#default_value' => $comment->homepage->value,
       '#maxlength' => 255,
       '#size' => 30,
-      '#access' => $is_admin || ($this->currentUser->isAnonymous() && $anonymous_contact != COMMENT_ANONYMOUS_MAYNOT_CONTACT),
+      '#access' => $is_admin || ($current_user->isAnonymous() && $anonymous_contact != COMMENT_ANONYMOUS_MAYNOT_CONTACT),
     );
 
     // Add administrative comment publishing options.
@@ -212,7 +220,7 @@ public function form(array $form, array &$form_state) {
     // Used for conditional validation of author fields.
     $form['is_anonymous'] = array(
       '#type' => 'value',
-      '#value' => ($comment->id() ? !$comment->uid->target_id : $this->currentUser->isAnonymous()),
+      '#value' => ($comment->id() ? !$comment->uid->target_id : $current_user->isAnonymous()),
     );
 
     // Add internal comment properties.
@@ -243,7 +251,7 @@ protected function actions(array $form, array &$form_state) {
 
     // Only show the save button if comment previews are optional or if we are
     // already previewing the submission.
-    $element['submit']['#access'] = ($comment->id() && $this->currentUser->hasPermission('administer comments')) || $preview_mode != DRUPAL_REQUIRED || isset($form_state['comment_preview']);
+    $element['submit']['#access'] = ($comment->id() && $this->authManager->getAccount()->hasPermission('administer comments')) || $preview_mode != DRUPAL_REQUIRED || isset($form_state['comment_preview']);
 
     $element['preview'] = array(
       '#type' => 'submit',
@@ -369,10 +377,11 @@ public function save(array $form, array &$form_state) {
     $comment = $this->entity;
     $field_name = $comment->field_name->value;
     $uri = $entity->uri();
+    $current_user = $this->authManager->getAccount();
 
-    if ($this->currentUser->hasPermission('post comments') && ($this->currentUser->hasPermission('administer comments') || $entity->{$field_name}->status == COMMENT_OPEN)) {
+    if ($current_user->hasPermission('post comments') && ($current_user->hasPermission('administer comments') || $entity->{$field_name}->status == COMMENT_OPEN)) {
       // Save the anonymous user information to a cookie for reuse.
-      if ($this->currentUser->isAnonymous()) {
+      if ($current_user->isAnonymous()) {
         user_cookie_save(array_intersect_key($form_state['values'], array_flip(array('name', 'mail', 'homepage'))));
       }
 
@@ -384,7 +393,7 @@ public function save(array $form, array &$form_state) {
 
       // Explain the approval queue if necessary.
       if ($comment->status->value == CommentInterface::NOT_PUBLISHED) {
-        if (!$this->currentUser->hasPermission('administer comments')) {
+        if (!$current_user->hasPermission('administer comments')) {
           drupal_set_message($this->t('Your comment has been queued for review by site administrators and will be published after approval.'));
         }
       }
diff --git a/core/modules/comment/lib/Drupal/comment/CommentManager.php b/core/modules/comment/lib/Drupal/comment/CommentManager.php
index e1075b3..d5e3205 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentManager.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentManager.php
@@ -8,6 +8,7 @@
 namespace Drupal\comment;
 
 use Drupal\Component\Utility\String;
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityManagerInterface;
@@ -36,11 +37,11 @@ class CommentManager implements CommentManagerInterface {
   protected $entityManager;
 
   /**
-   * The current user.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface $current_user
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $currentUser;
+  protected $authManager;
 
   /**
    * Whether the DRUPAL_AUTHENTICATED_RID can post comments.
@@ -77,8 +78,8 @@ class CommentManager implements CommentManagerInterface {
    *   The field info service.
    * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
    *   The entity manager service.
-   * @param \Drupal\Core\Session\AccountInterface $current_user
-   *   The current user.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    * @param \Drupal\Core\Config\ConfigFactory $config_factory
    *   The config factory.
    * @param \Drupal\Core\StringTranslation\TranslationInterface $translation_manager
@@ -86,10 +87,10 @@ class CommentManager implements CommentManagerInterface {
    * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
    *   The url generator service.
    */
-  public function __construct(FieldInfo $field_info, EntityManagerInterface $entity_manager, AccountInterface $current_user, ConfigFactory $config_factory, TranslationInterface $translation_manager, UrlGeneratorInterface $url_generator) {
+  public function __construct(FieldInfo $field_info, EntityManagerInterface $entity_manager, AuthenticationManagerInterface $auth_manager, ConfigFactory $config_factory, TranslationInterface $translation_manager, UrlGeneratorInterface $url_generator) {
     $this->fieldInfo = $field_info;
     $this->entityManager = $entity_manager;
-    $this->currentUser = $current_user;
+    $this->authManager = $auth_manager;
     $this->userConfig = $config_factory->get('user.settings');
     $this->translationManager = $translation_manager;
     $this->urlGenerator = $url_generator;
@@ -256,7 +257,7 @@ public function getFieldUIPageTitle($commented_entity_type, $field_name) {
    * {@inheritdoc}
    */
   public function forbiddenMessage(EntityInterface $entity, $field_name) {
-    if ($this->currentUser->isAnonymous()) {
+    if ($this->authManager->getAccount()->isAnonymous()) {
       if (!isset($this->authenticatedCanPostComments)) {
         // We only output a link if we are certain that users will get the
         // permission to post comments by logging in.
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
index b6ce094..feac5ef 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
@@ -8,9 +8,9 @@
 namespace Drupal\comment\Plugin\Field\FieldFormatter;
 
 use Drupal\comment\CommentStorageControllerInterface;
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Entity\EntityViewBuilderInterface;
 use Drupal\Core\Field\FieldItemListInterface;
-use Drupal\Core\Session\AccountInterface;
 use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\Core\Field\FormatterBase;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
@@ -44,11 +44,11 @@ class CommentDefaultFormatter extends FormatterBase implements ContainerFactoryP
   protected $storageController;
 
   /**
-   * The current user.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $currentUser;
+  protected $authManager;
 
   /**
    * The comment render controller.
@@ -68,7 +68,7 @@ public static function create(ContainerInterface $container, array $configuratio
       $configuration['settings'],
       $configuration['label'],
       $configuration['view_mode'],
-      $container->get('current_user'),
+      $container->get('authentication'),
       $container->get('entity.manager')->getStorageController('comment'),
       $container->get('entity.manager')->getViewBuilder('comment')
     );
@@ -89,18 +89,18 @@ public static function create(ContainerInterface $container, array $configuratio
    *   The formatter label display setting.
    * @param string $view_mode
    *   The view mode.
-   * @param \Drupal\Core\Session\AccountInterface $current_user
-   *   The current user.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    * @param \Drupal\comment\CommentStorageControllerInterface $comment_storage_controller
    *   The comment storage controller.
    * @param \Drupal\Core\Entity\EntityViewBuilderInterface $comment_view_builder
    *   The comment view builder.
    */
-  public function __construct($plugin_id, array $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, AccountInterface $current_user, CommentStorageControllerInterface $comment_storage_controller, EntityViewBuilderInterface $comment_view_builder) {
+  public function __construct($plugin_id, array $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, AuthenticationManagerInterface $auth_manager, CommentStorageControllerInterface $comment_storage_controller, EntityViewBuilderInterface $comment_view_builder) {
     parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode);
     $this->viewBuilder = $comment_view_builder;
     $this->storageController = $comment_storage_controller;
-    $this->currentUser = $current_user;
+    $this->authManager = $auth_manager;
   }
 
   /**
@@ -121,13 +121,14 @@ public function viewElements(FieldItemListInterface $items) {
       // return anything if the view mode is search_index or search_result.
       !in_array($this->viewMode, array('search_result', 'search_index'))) {
       $comment_settings = $this->getFieldSettings();
+      $current_user = $this->authManager->getAccount();
 
       // Only attempt to render comments if the entity has visible comments.
       // Unpublished comments are not included in
       // $entity->get($field_name)->comment_count, but unpublished comments
       // should display if the user is an administrator.
-      if ((($entity->get($field_name)->comment_count && $this->currentUser->hasPermission('access comments')) ||
-        $this->currentUser->hasPermission('administer comments'))) {
+      if ((($entity->get($field_name)->comment_count && $current_user->hasPermission('access comments')) ||
+        $current_user->hasPermission('administer comments'))) {
         $mode = $comment_settings['default_mode'];
         $comments_per_page = $comment_settings['per_page'];
         if ($cids = comment_get_thread($entity, $field_name, $mode, $comments_per_page, $this->settings['pager_id'])) {
@@ -146,10 +147,10 @@ public function viewElements(FieldItemListInterface $items) {
       // display below the entity.
       if ($status == COMMENT_OPEN && $comment_settings['form_location'] == COMMENT_FORM_BELOW) {
         // Only show the add comment form if the user has permission.
-        if ($this->currentUser->hasPermission('post comments')) {
+        if ($current_user->hasPermission('post comments')) {
           // All users in the "anonymous" role can use the same form: it is fine
           // for this form to be stored in the render cache.
-          if ($this->currentUser->isAnonymous()) {
+          if ($current_user->isAnonymous()) {
             $output['comment_form'] = comment_add($entity, $field_name);
           }
           // All other users need a user-specific form, which would break the
diff --git a/core/modules/comment/tests/Drupal/comment/Tests/Entity/CommentLockTest.php b/core/modules/comment/tests/Drupal/comment/Tests/Entity/CommentLockTest.php
index d5f2eee..c221e0b 100644
--- a/core/modules/comment/tests/Drupal/comment/Tests/Entity/CommentLockTest.php
+++ b/core/modules/comment/tests/Drupal/comment/Tests/Entity/CommentLockTest.php
@@ -33,7 +33,13 @@ public static function getInfo() {
    */
   public function testLocks() {
     $container = new ContainerBuilder();
-    $container->set('current_user', $this->getMock('Drupal\Core\Session\AccountInterface'));
+
+    $auth_manager = $this->getMock('Drupal\Core\Authentication\AuthenticationManagerInterface');
+    $auth_manager->expects($this->any())
+      ->method('getAccount')
+      ->will($this->returnValue($this->getMock('Drupal\Core\Session\AccountInterface')));
+    $container->set('authentication', $auth_manager);
+
     $container->register('request', 'Symfony\Component\HttpFoundation\Request');
     $lock = $this->getMock('Drupal\Core\Lock\LockBackendInterface');
     $cid = 2;
diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationController.php b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationController.php
index 03c2a20..459d0a8 100644
--- a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationController.php
+++ b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationController.php
@@ -9,12 +9,12 @@
 
 use Drupal\config_translation\ConfigMapperManagerInterface;
 use Drupal\Core\Access\AccessManager;
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
 use Drupal\Core\Language\Language;
 use Drupal\Core\Language\LanguageManagerInterface;
 use Drupal\Core\PathProcessor\InboundPathProcessorInterface;
-use Drupal\Core\Session\AccountInterface;
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\Request;
@@ -56,11 +56,11 @@ class ConfigTranslationController extends ControllerBase implements ContainerInj
   protected $pathProcessor;
 
   /**
-   * The current user.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $account;
+  protected $authManager;
 
   /**
    * The language manager.
@@ -80,17 +80,17 @@ class ConfigTranslationController extends ControllerBase implements ContainerInj
    *   The dynamic router service.
    * @param \Drupal\Core\PathProcessor\InboundPathProcessorInterface $path_processor
    *   The inbound path processor.
-   * @param \Drupal\Core\Session\AccountInterface $account
-   *   The current user.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
    *   The language manager.
    */
-  public function __construct(ConfigMapperManagerInterface $config_mapper_manager, AccessManager $access_manager, RequestMatcherInterface $router, InboundPathProcessorInterface $path_processor, AccountInterface $account, LanguageManagerInterface $language_manager) {
+  public function __construct(ConfigMapperManagerInterface $config_mapper_manager, AccessManager $access_manager, RequestMatcherInterface $router, InboundPathProcessorInterface $path_processor, AuthenticationManagerInterface $auth_manager, LanguageManagerInterface $language_manager) {
     $this->configMapperManager = $config_mapper_manager;
     $this->accessManager = $access_manager;
     $this->router = $router;
     $this->pathProcessor = $path_processor;
-    $this->account = $account;
+    $this->authManager = $auth_manager;
     $this->languageManager = $language_manager;
   }
 
@@ -103,7 +103,7 @@ public static function create(ContainerInterface $container) {
       $container->get('access_manager'),
       $container->get('router'),
       $container->get('path_processor_manager'),
-      $container->get('current_user'),
+      $container->get('authentication'),
       $container->get('language_manager')
     );
   }
@@ -175,7 +175,7 @@ public function itemPage(Request $request, $plugin_id) {
           // Note that the parameters don't really matter here since we're
           // passing in the request which already has the upcast attributes.
           $parameters = array();
-          $edit_access = $this->accessManager->checkNamedRoute($route_name, $parameters, $this->account, $route_request);
+          $edit_access = $this->accessManager->checkNamedRoute($route_name, $parameters, $this->authManager->getAccount(), $route_request);
         }
 
         // Build list of operations.
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceSelectionAccessTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceSelectionAccessTest.php
index 3fb6460..dc7557b 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceSelectionAccessTest.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceSelectionAccessTest.php
@@ -120,7 +120,7 @@ public function testNodeHandler() {
 
     // Test as a non-admin.
     $normal_user = $this->drupalCreateUser(array('access content'));
-    $this->container->set('current_user', $normal_user);
+    $this->container->get('authentication')->setAccount($normal_user);
     $referenceable_tests = array(
       array(
         'arguments' => array(
@@ -172,7 +172,7 @@ public function testNodeHandler() {
 
     // Test as an admin.
     $admin_user = $this->drupalCreateUser(array('access content', 'bypass node access'));
-    $this->container->set('current_user', $admin_user);
+    $this->container->get('authentication')->setAccount($admin_user);
     $referenceable_tests = array(
       array(
         'arguments' => array(
@@ -266,7 +266,7 @@ public function testUserHandler() {
     }
 
     // Test as a non-admin.
-    $this->container->set('current_user', $users['non_admin']);
+    $this->container->get('authentication')->setAccount($users['non_admin']);
     $referenceable_tests = array(
       array(
         'arguments' => array(
@@ -305,7 +305,7 @@ public function testUserHandler() {
     );
     $this->assertReferenceable($instance, $referenceable_tests, 'User handler');
 
-    $this->container->set('current_user', $users['admin']);
+    $this->container->get('authentication')->setAccount($users['admin']);
     $referenceable_tests = array(
       array(
         'arguments' => array(
@@ -447,7 +447,7 @@ public function testCommentHandler() {
 
     // Test as a non-admin.
     $normal_user = $this->drupalCreateUser(array('access content', 'access comments'));
-    $this->container->set('current_user', $normal_user);
+    $this->container->get('authentication')->setAccount($normal_user);
     $referenceable_tests = array(
       array(
         'arguments' => array(
@@ -486,7 +486,7 @@ public function testCommentHandler() {
 
     // Test as a comment admin.
     $admin_user = $this->drupalCreateUser(array('access content', 'access comments', 'administer comments'));
-    $this->container->set('current_user', $admin_user);
+    $this->container->get('authentication')->setAccount($admin_user);
     $referenceable_tests = array(
       array(
         'arguments' => array(
@@ -504,7 +504,7 @@ public function testCommentHandler() {
 
     // Test as a node and comment admin.
     $admin_user = $this->drupalCreateUser(array('access content', 'access comments', 'administer comments', 'bypass node access'));
-    $this->container->set('current_user', $admin_user);
+    $this->container->get('authentication')->setAccount($admin_user);
     $referenceable_tests = array(
       array(
         'arguments' => array(
diff --git a/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php b/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php
index 62b51fb..a5379d1 100644
--- a/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php
@@ -129,7 +129,7 @@ function testFileValidateNameLength() {
    * Test file_validate_size().
    */
   function testFileValidateSize() {
-    $user = $this->container->get('current_user');
+    $user = $this->container->get('authentication')->setAccount();
     $original_user = $user;
     drupal_save_session(FALSE);
 
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php
index f9b4822..0891972 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php
@@ -205,7 +205,7 @@ function testTypedDataAPI() {
 
     // Test with anonymous user.
     $user = drupal_anonymous_user();
-    $this->container->set('current_user', $user);
+    $this->container->get('authentication')->setAccount($user);
 
     $expected_available_options = array(
       'filtered_html' => 'Filtered HTML',
@@ -244,7 +244,7 @@ function testTypedDataAPI() {
     $this->assertFilterFormatViolation($violations, 'filtered_html');
 
     // Set user with access to 'filtered_html' format.
-    $this->container->set('current_user', $filtered_html_user);
+    $this->container->get('authentication')->setAccount($filtered_html_user);
     $violations = $data->validate();
     $this->assertEqual(count($violations), 0, "No validation violation for accessible format 'filtered_html' found.");
 
diff --git a/core/modules/language/lib/Drupal/language/EventSubscriber/LanguageRequestSubscriber.php b/core/modules/language/lib/Drupal/language/EventSubscriber/LanguageRequestSubscriber.php
index 26c8190..8c9753b 100644
--- a/core/modules/language/lib/Drupal/language/EventSubscriber/LanguageRequestSubscriber.php
+++ b/core/modules/language/lib/Drupal/language/EventSubscriber/LanguageRequestSubscriber.php
@@ -7,9 +7,9 @@
 
 namespace Drupal\language\EventSubscriber;
 
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\Language\Language;
-use Drupal\Core\Session\AccountInterface;
 use Drupal\Core\StringTranslation\Translator\TranslatorInterface;
 use Drupal\language\ConfigurableLanguageManagerInterface;
 use Drupal\language\LanguageNegotiatorInterface;
@@ -45,11 +45,11 @@ class LanguageRequestSubscriber implements EventSubscriberInterface {
   protected $translation;
 
   /**
-   * The current active user.
+   * The authentication manager.
    *
-   * @return \Drupal\Core\Session\AccountInterface
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $currentUser;
+  protected $authManager;
 
   /**
    * The configuration factory.
@@ -67,16 +67,16 @@ class LanguageRequestSubscriber implements EventSubscriberInterface {
    *   The language negotiator.
    * @param \Drupal\Core\Translation\Translator\TranslatorInterface $translation
    *   The translation service.
-   * @param \Drupal\Core\Session\AccountInterface $current_user
-   *   The current active user.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    * @param \Drupal\Core\Config\ConfigFactory $config_factory
    *   The configuration factory.
    */
-  public function __construct(ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, TranslatorInterface $translation, AccountInterface $current_user, ConfigFactory $config_factory) {
+  public function __construct(ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, TranslatorInterface $translation, AuthenticationManagerInterface $auth_manager, ConfigFactory $config_factory) {
     $this->languageManager = $language_manager;
     $this->negotiator = $negotiator;
     $this->translation = $translation;
-    $this->currentUser = $current_user;
+    $this->authManager = $auth_manager;
     $this->configFactory = $config_factory;
   }
 
@@ -89,7 +89,7 @@ public function __construct(ConfigurableLanguageManagerInterface $language_manag
   public function onKernelRequestLanguage(GetResponseEvent $event) {
     if ($event->getRequestType() == HttpKernelInterface::MASTER_REQUEST) {
       $request = $event->getRequest();
-      $this->negotiator->setCurrentUser($this->currentUser);
+      $this->negotiator->setCurrentUser($this->authManager->getAccount());
       $this->negotiator->setRequest($request);
       if ($this->languageManager instanceof ConfigurableLanguageManagerInterface) {
         $this->languageManager->setNegotiator($this->negotiator);
diff --git a/core/modules/language/lib/Drupal/language/HttpKernel/PathProcessorLanguage.php b/core/modules/language/lib/Drupal/language/HttpKernel/PathProcessorLanguage.php
index 71a5cfe..34ac191 100644
--- a/core/modules/language/lib/Drupal/language/HttpKernel/PathProcessorLanguage.php
+++ b/core/modules/language/lib/Drupal/language/HttpKernel/PathProcessorLanguage.php
@@ -9,6 +9,7 @@
 
 use Drupal\Component\Utility\Settings;
 use Drupal\Component\Utility\Unicode;
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\PathProcessor\InboundPathProcessorInterface;
 use Drupal\Core\PathProcessor\OutboundPathProcessorInterface;
@@ -65,6 +66,13 @@ class PathProcessorLanguage implements InboundPathProcessorInterface, OutboundPa
   protected $multilingual;
 
   /**
+   * The authentication manager.
+   *
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
+   */
+  protected $authManager;
+
+  /**
    * Constructs a PathProcessorLanguage object.
    *
    * @param \Drupal\Core\Config\ConfigFactory $config
@@ -75,15 +83,16 @@ class PathProcessorLanguage implements InboundPathProcessorInterface, OutboundPa
    *   The configurable language manager.
    * @param \Drupal\language\LanguageNegotiatorInterface
    *   The language negotiator.
-   * @param \Drupal\Core\Session\AccountInterface $current_user
-   *   The current active user.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    */
-  public function __construct(ConfigFactory $config, Settings $settings, ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, AccountInterface $current_user) {
+  public function __construct(ConfigFactory $config, Settings $settings, ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, AuthenticationManagerInterface $auth_manager) {
     $this->config = $config;
     $this->mixedModeSessions = $settings->get('mixed_mode_sessions', FALSE);
     $this->languageManager = $language_manager;
     $this->negotiator = $negotiator;
-    $this->negotiator->setCurrentUser($current_user);
+    $this->authManager = $auth_manager;
+    $this->negotiator->setCurrentUser($this->authManager->getAccount());
   }
 
   /**
diff --git a/core/modules/language/lib/Drupal/language/LanguageServiceProvider.php b/core/modules/language/lib/Drupal/language/LanguageServiceProvider.php
index 8c11eca..e4702fa 100644
--- a/core/modules/language/lib/Drupal/language/LanguageServiceProvider.php
+++ b/core/modules/language/lib/Drupal/language/LanguageServiceProvider.php
@@ -31,7 +31,7 @@ public function register(ContainerBuilder $container) {
         ->addArgument(new Reference('language_manager'))
         ->addArgument(new Reference('language_negotiator'))
         ->addArgument(new Reference('string_translation'))
-        ->addArgument(new Reference('current_user'))
+        ->addArgument(new Reference('authentication'))
         ->addArgument(new Reference('config.factory'));
 
       $container->register('path_processor_language', 'Drupal\language\HttpKernel\PathProcessorLanguage')
@@ -41,7 +41,7 @@ public function register(ContainerBuilder $container) {
         ->addArgument(new Reference('settings'))
         ->addArgument(new Reference('language_manager'))
         ->addArgument(new Reference('language_negotiator'))
-        ->addArgument(new Reference('current_user'));
+        ->addArgument(new Reference('authentication'));
     }
   }
 
diff --git a/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php b/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php
index c3acc23..87516eb 100644
--- a/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php
+++ b/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\node\Plugin\Search;
 
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Config\Config;
 use Drupal\Core\Database\Connection;
 use Drupal\Core\Database\Query\SelectExtender;
@@ -68,11 +69,11 @@ class NodeSearch extends ConfigurableSearchPluginBase implements AccessibleInter
   protected $state;
 
   /**
-   * The Drupal account to use for checking for access to advanced search.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $account;
+  protected $authManager;
 
   /**
    * An array of additional rankings from hook_ranking().
@@ -114,7 +115,7 @@ static public function create(ContainerInterface $container, array $configuratio
       $container->get('module_handler'),
       $container->get('config.factory')->get('search.settings'),
       $container->get('state'),
-      $container->get('current_user')
+      $container->get('authentication')
     );
   }
 
@@ -137,16 +138,16 @@ static public function create(ContainerInterface $container, array $configuratio
    *   A config object for 'search.settings'.
    * @param \Drupal\Core\KeyValueStore\StateInterface $state
    *   The Drupal state object used to set 'node.cron_last'.
-   * @param \Drupal\Core\Session\AccountInterface $account
-   *   The $account object to use for checking for access to advanced search.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, Connection $database, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, Config $search_settings, StateInterface $state, AccountInterface $account = NULL) {
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, Connection $database, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, Config $search_settings, StateInterface $state, AuthenticationManagerInterface $auth_manager) {
     $this->database = $database;
     $this->entityManager = $entity_manager;
     $this->moduleHandler = $module_handler;
     $this->searchSettings = $search_settings;
     $this->state = $state;
-    $this->account = $account;
+    $this->authManager = $auth_manager;
     parent::__construct($configuration, $plugin_id, $plugin_definition);
   }
 
@@ -371,13 +372,14 @@ public function indexStatus() {
    * {@inheritdoc}
    */
   public function searchFormAlter(array &$form, array &$form_state) {
+    $account = $this->authManager->getAccount();
     // Add keyword boxes.
     $form['advanced'] = array(
       '#type' => 'details',
       '#title' => t('Advanced search'),
       '#collapsed' => TRUE,
       '#attributes' => array('class' => array('search-advanced')),
-      '#access' => $this->account && $this->account->hasPermission('use advanced search'),
+      '#access' => $account && $account->hasPermission('use advanced search'),
     );
     $form['advanced']['keywords-fieldset'] = array(
       '#type' => 'fieldset',
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
index b9eb05a..9c4dae5 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
@@ -8,6 +8,7 @@
 namespace Drupal\simpletest;
 
 use Drupal\Component\Utility\Random;
+use Drupal\Core\Authentication\AuthenticationManager;
 use Drupal\Core\Database\Database;
 use Drupal\Component\Utility\Settings;
 use Drupal\Core\Config\ConfigImporter;
@@ -1029,7 +1030,10 @@ private function prepareEnvironment() {
 
     $request = Request::create('/');
     $this->container->set('request', $request);
-    $this->container->set('current_user', $GLOBALS['user']);
+
+    $auth_manager = new AuthenticationManager();
+    $auth_manager->setAccount($GLOBALS['user']);
+    $this->container->set('authentication', $auth_manager);
 
     \Drupal::setContainer($this->container);
 
@@ -1108,7 +1112,10 @@ protected function rebuildContainer() {
     $this->container = \Drupal::getContainer();
     // The global $user is set in TestBase::prepareEnvironment().
     $this->container->set('request', $request);
-    $this->container->set('current_user', $GLOBALS['user']);
+
+    $auth_manager = new AuthenticationManager();
+    $auth_manager->setAccount($GLOBALS['user']);
+    $this->container->set('authentication', $auth_manager);
   }
 
   /**
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php
index 2a19a5c1..4586348 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php
@@ -63,11 +63,11 @@ function testInternalBrowser() {
       )));
       $this->assertNoTitle('Foo');
 
-      $old_user_id = $this->container->get('current_user')->id();
+      $old_user_id = $this->container->get('authentication')->getAccount()->id();
       $user = $this->drupalCreateUser();
       $this->drupalLogin($user);
       // Check that current user service updated.
-      $this->assertNotEqual($old_user_id, $this->container->get('current_user')->id(), 'Current user service updated.');
+      $this->assertNotEqual($old_user_id, $this->container->get('authentication')->getAccount()->id(), 'Current user service updated.');
       $headers = $this->drupalGetHeaders(TRUE);
       $this->assertEqual(count($headers), 2, 'There was one intermediate request.');
       $this->assertTrue(strpos($headers[0][':status'], '302') !== FALSE, 'Intermediate response code was 302.');
@@ -79,7 +79,7 @@ function testInternalBrowser() {
       // Test the maximum redirection option.
       $this->drupalLogout();
       // Check that current user service updated to anonymous user.
-      $this->assertEqual(0, $this->container->get('current_user')->id(), 'Current user service updated.');
+      $this->assertEqual(0, $this->container->get('authentication')->getAccount()->id(), 'Current user service updated.');
       $edit = array(
         'name' => $user->getUsername(),
         'pass' => $user->pass_raw
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index b284941..3fc72f5 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -644,10 +644,7 @@ protected function drupalLogin(AccountInterface $account) {
     $pass = $this->assert($this->drupalUserIsLoggedIn($account), format_string('User %name successfully logged in.', array('%name' => $account->getUsername())), 'User login');
     if ($pass) {
       $this->loggedInUser = $account;
-      $this->container->set('current_user', $account);
-      // @todo Temporary workaround for not being able to use synchronized
-      //   services in non dumped container.
-      $this->container->get('access_subscriber')->setCurrentUser($account);
+      $this->container->get('authentication')->setAccount($account);
     }
   }
 
@@ -692,7 +689,7 @@ protected function drupalLogout() {
       // @see WebTestBase::drupalUserIsLoggedIn()
       unset($this->loggedInUser->session_id);
       $this->loggedInUser = FALSE;
-      $this->container->set('current_user', drupal_anonymous_user());
+      $this->container->get('authentication')->setAccount(drupal_anonymous_user());
     }
   }
 
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php
index eb234b4..b5dd39a 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php
@@ -43,7 +43,7 @@ public function testEntityLanguageMethods() {
   protected function _testEntityLanguageMethods($entity_type) {
     $entity = entity_create($entity_type, array(
       'name' => 'test',
-      'user_id' => $this->container->get('current_user')->id(),
+      'user_id' => $this->container->get('authentication')->getAccount()->id(),
     ));
     $this->assertEqual($entity->language()->id, Language::LANGCODE_NOT_SPECIFIED, format_string('%entity_type: Entity language not specified.', array('%entity_type' => $entity_type)));
     $this->assertFalse($entity->getTranslationLanguages(FALSE), format_string('%entity_type: No translations are available', array('%entity_type' => $entity_type)));
diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/FormCacheTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/FormCacheTest.php
index 0e6d629..2a86bb1 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Form/FormCacheTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Form/FormCacheTest.php
@@ -46,7 +46,7 @@ public function setUp() {
    * Tests the form cache with a logged-in user.
    */
   function testCacheToken() {
-    $this->container->set('current_user', new UserSession(array('uid' => 1)));
+    $this->container->get('authentication')->setAccount(new UserSession(array('uid' => 1)));
     form_set_cache($this->form_build_id, $this->form, $this->form_state);
 
     $cached_form_state = form_state_defaults();
@@ -75,7 +75,7 @@ function testCacheToken() {
    * Tests the form cache without a logged-in user.
    */
   function testNoCacheToken() {
-    $this->container->set('current_user', new UserSession(array('uid' => 0)));
+    $this->container->get('authentication')->setAccount(new UserSession(array('uid' => 0)));
 
     $this->form_state['example'] = $this->randomName();
     form_set_cache($this->form_build_id, $this->form, $this->form_state);
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
index 0ae413f..9b38c82 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
@@ -228,7 +228,7 @@ function testLinks() {
     $this->assertThemeOutput('links', $variables, $expected);
 
     // Verify the data- attributes for setting the "active" class on links.
-    $this->container->set('current_user', new UserSession(array('uid' => 1)));
+    $this->container->get('authentication')->setAccount(new UserSession(array('uid' => 1)));
     $variables['set_active_class'] = TRUE;
     $expected_links = '';
     $expected_links .= '<ul id="somelinks">';
diff --git a/core/modules/system/tests/modules/router_test_directory/lib/Drupal/router_test/TestContent.php b/core/modules/system/tests/modules/router_test_directory/lib/Drupal/router_test/TestContent.php
index 71d095c..1fce1d9 100644
--- a/core/modules/system/tests/modules/router_test_directory/lib/Drupal/router_test/TestContent.php
+++ b/core/modules/system/tests/modules/router_test_directory/lib/Drupal/router_test/TestContent.php
@@ -61,7 +61,7 @@ public function test11() {
 
   public function testAccount(UserInterface $user) {
     $current_user = \Drupal::currentUser();
-    $this->container->set('current_user', $user);
+    $this->container->get('authentication')->setAccount($user);
     return $current_user->getUsername() . ':' . $user->getUsername();
   }
 
diff --git a/core/modules/user/lib/Drupal/user/Plugin/Search/UserSearch.php b/core/modules/user/lib/Drupal/user/Plugin/Search/UserSearch.php
index 518d9c0..ae52b11 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/Search/UserSearch.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/Search/UserSearch.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\user\Plugin\Search;
 
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Database\Connection;
 use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
@@ -47,11 +48,11 @@ class UserSearch extends SearchPluginBase implements AccessibleInterface {
   protected $moduleHandler;
 
   /**
-   * The current user.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $currentUser;
+  protected $authManager;
 
   /**
    * {@inheritdoc}
@@ -61,7 +62,7 @@ static public function create(ContainerInterface $container, array $configuratio
       $container->get('database'),
       $container->get('entity.manager'),
       $container->get('module_handler'),
-      $container->get('current_user'),
+      $container->get('authentication'),
       $configuration,
       $plugin_id,
       $plugin_definition
@@ -77,8 +78,8 @@ static public function create(ContainerInterface $container, array $configuratio
    *   The entity manager.
    * @param ModuleHandlerInterface $module_handler
    *   The module handler.
-   * @param \Drupal\Core\Session\AccountInterface $current_user
-   *   The current user.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    * @param array $configuration
    *   A configuration array containing information about the plugin instance.
    * @param string $plugin_id
@@ -86,11 +87,11 @@ static public function create(ContainerInterface $container, array $configuratio
    * @param array $plugin_definition
    *   The plugin implementation definition.
    */
-  public function __construct(Connection $database, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, AccountInterface $current_user, array $configuration, $plugin_id, array $plugin_definition) {
+  public function __construct(Connection $database, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, AuthenticationManagerInterface $auth_manager, array $configuration, $plugin_id, array $plugin_definition) {
     $this->database = $database;
     $this->entityManager = $entity_manager;
     $this->moduleHandler = $module_handler;
-    $this->currentUser = $current_user;
+    $this->authManager = $auth_manager;
     parent::__construct($configuration, $plugin_id, $plugin_definition);
   }
 
@@ -106,6 +107,8 @@ public function access($operation = 'view', AccountInterface $account = NULL) {
    */
   public function execute() {
     $results = array();
+    $current_user = $this->authManager->getAccount();
+
     if (!$this->isSearchExecutable()) {
       return $results;
     }
@@ -116,7 +119,7 @@ public function execute() {
       ->select('users')
       ->extend('Drupal\Core\Database\Query\PagerSelectExtender');
     $query->fields('users', array('uid'));
-    if ($this->currentUser->hasPermission('administer users')) {
+    if ($current_user->hasPermission('administer users')) {
       // Administrators can also search in the otherwise private email field, and
       // they don't need to be restricted to only active users.
       $query->fields('users', array('mail'));
@@ -142,7 +145,7 @@ public function execute() {
         'title' => $account->getUsername(),
         'link' => url('user/' . $account->id(), array('absolute' => TRUE)),
       );
-      if ($this->currentUser->hasPermission('administer users')) {
+      if ($current_user->hasPermission('administer users')) {
         $result['title'] .= ' (' . $account->getEmail() . ')';
       }
       $results[] = $result;
diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/argument_default/CurrentUser.php b/core/modules/user/lib/Drupal/user/Plugin/views/argument_default/CurrentUser.php
index e763bae..d2b54dc 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/views/argument_default/CurrentUser.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/views/argument_default/CurrentUser.php
@@ -22,8 +22,7 @@
 class CurrentUser extends ArgumentDefaultPluginBase {
 
   public function getArgument() {
-    global $user;
-    return $user->id();
+    return \Drupal::currentUser()->id();
   }
 
 }
diff --git a/core/modules/user/lib/Drupal/user/Theme/AdminNegotiator.php b/core/modules/user/lib/Drupal/user/Theme/AdminNegotiator.php
index faaeb40..becb373 100644
--- a/core/modules/user/lib/Drupal/user/Theme/AdminNegotiator.php
+++ b/core/modules/user/lib/Drupal/user/Theme/AdminNegotiator.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\user\Theme;
 
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Session\AccountInterface;
@@ -19,11 +20,11 @@
 class AdminNegotiator implements ThemeNegotiatorInterface {
 
   /**
-   * The current user.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $user;
+  protected $authManager;
 
   /**
    * The config factory.
@@ -49,8 +50,8 @@ class AdminNegotiator implements ThemeNegotiatorInterface {
    * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
    *   The entity manager.
    */
-  public function __construct(AccountInterface $user, ConfigFactory $config_factory, EntityManagerInterface $entity_manager) {
-    $this->user = $user;
+  public function __construct(AuthenticationManagerInterface $auth_manager, ConfigFactory $config_factory, EntityManagerInterface $entity_manager) {
+    $this->authManager = $auth_manager;
     $this->configFactory = $config_factory;
     $this->entityManager = $entity_manager;
   }
@@ -60,7 +61,7 @@ public function __construct(AccountInterface $user, ConfigFactory $config_factor
    */
   public function applies(Request $request) {
     $path = $request->attributes->get('_system_path');
-    return ($this->entityManager->hasController('user_role', 'storage') && $this->user->hasPermission('view the administration theme') && path_is_admin($path));
+    return ($this->entityManager->hasController('user_role', 'storage') && $this->authManager->getAccount()->hasPermission('view the administration theme') && path_is_admin($path));
   }
 
   /**
diff --git a/core/modules/user/user.services.yml b/core/modules/user/user.services.yml
index 23d8706..23cf0cd 100644
--- a/core/modules/user/user.services.yml
+++ b/core/modules/user/user.services.yml
@@ -27,7 +27,7 @@ services:
       - { name: event_subscriber }
   theme.negotiator.admin_theme:
     class: Drupal\user\Theme\AdminNegotiator
-    arguments: ['@current_user', '@config.factory', '@entity.manager']
+    arguments: ['@authentication', '@config.factory', '@entity.manager']
     tags:
       - { name: theme_negotiator, priority: -40 }
   user.permissions_hash:
diff --git a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlockBase.php b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlockBase.php
index 56f3c86..2fff5a8 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlockBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlockBase.php
@@ -41,13 +41,6 @@
   protected $displaySet;
 
   /**
-   * The current user.
-   *
-   * @var \Drupal\Core\Session\AccountInterface
-   */
-  protected $user;
-
-  /**
    * Constructs a \Drupal\views\Plugin\Block\ViewsBlockBase object.
    *
    * @param array $configuration
@@ -60,10 +53,10 @@
    *   The view executable factory.
    * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller
    *   The views storage controller.
-   * @param \Drupal\Core\Session\AccountInterface $user
-   *   The current user.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, ViewExecutableFactory $executable_factory, EntityStorageControllerInterface $storage_controller, AccountInterface $user) {
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, ViewExecutableFactory $executable_factory, EntityStorageControllerInterface $storage_controller) {
     $this->pluginId = $plugin_id;
     $delta = $this->getDerivativeId();
     list($name, $this->displayID) = explode('-', $delta, 2);
@@ -71,7 +64,6 @@ public function __construct(array $configuration, $plugin_id, array $plugin_defi
     $view = $storage_controller->load($name);
     $this->view = $executable_factory->get($view);
     $this->displaySet = $this->view->setDisplay($this->displayID);
-    $this->user = $user;
 
     parent::__construct($configuration, $plugin_id, $plugin_definition);
   }
@@ -83,8 +75,7 @@ public static function create(ContainerInterface $container, array $configuratio
     return new static(
       $configuration, $plugin_id, $plugin_definition,
       $container->get('views.executable'),
-      $container->get('entity.manager')->getStorageController('view'),
-      $container->get('current_user')
+      $container->get('entity.manager')->getStorageController('view')
     );
   }
 
diff --git a/core/modules/views/lib/Drupal/views/ViewExecutableFactory.php b/core/modules/views/lib/Drupal/views/ViewExecutableFactory.php
index c6f9828..295fe9a 100644
--- a/core/modules/views/lib/Drupal/views/ViewExecutableFactory.php
+++ b/core/modules/views/lib/Drupal/views/ViewExecutableFactory.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\views;
 
+use Drupal\Core\Authentication\AuthenticationManagerInterface;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\views\ViewStorageInterface;
 
@@ -16,20 +17,20 @@
 class ViewExecutableFactory {
 
   /**
-   * Stores the current user.
+   * The authentication manager.
    *
-   * @var \Drupal\Core\Session\AccountInterface
+   * @var \Drupal\Core\Authentication\AuthenticationManagerInterface
    */
-  protected $user;
+  protected $authManager;
 
   /**
    * Constructs a new ViewExecutableFactory
    *
-   * @param \Drupal\Core\Session\AccountInterface $user
-   *   The current user.
+   * @param \Drupal\Core\Authentication\AuthenticationManagerInterface $auth_manager
+   *   The authentication manager.
    */
-  public function __construct(AccountInterface $user) {
-    $this->user = $user;
+  public function __construct(AuthenticationManagerInterface $auth_manager) {
+    $this->authManager = $auth_manager;
   }
 
   /**
@@ -42,7 +43,7 @@ public function __construct(AccountInterface $user) {
    *   A ViewExecutable instance.
    */
   public function get(ViewStorageInterface $view) {
-    return new ViewExecutable($view, $this->user);
+    return new ViewExecutable($view, $this->authManager->getAccount());
   }
 
 }
diff --git a/core/modules/views/views.services.yml b/core/modules/views/views.services.yml
index 30aa96a..6605790 100644
--- a/core/modules/views/views.services.yml
+++ b/core/modules/views/views.services.yml
@@ -64,7 +64,7 @@ services:
     arguments: ['@views.views_data']
   views.executable:
     class: Drupal\views\ViewExecutableFactory
-    arguments: ['@current_user']
+    arguments: ['@authentication']
   views.analyzer:
     class: Drupal\views\Analyzer
     arguments: ['@module_handler']
diff --git a/core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewUIObjectTest.php b/core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewUIObjectTest.php
index b8256a5..af211c3 100644
--- a/core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewUIObjectTest.php
+++ b/core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewUIObjectTest.php
@@ -91,7 +91,13 @@ public function testIsLocked() {
       ->will($this->returnValue(1));
 
     $container = new ContainerBuilder();
-    $container->set('current_user', $account);
+
+    $auth_manager = $this->getMock('Drupal\Core\Authentication\AuthenticationManagerInterface');
+    $auth_manager->expects($this->exactly(2))
+      ->method('getAccount')
+      ->will($this->returnValue($account));
+    $container->set('authentication', $auth_manager);
+
     \Drupal::setContainer($container);
 
     $view_ui = new ViewUI($storage, $executable);
diff --git a/core/tests/Drupal/Tests/Core/DrupalTest.php b/core/tests/Drupal/Tests/Core/DrupalTest.php
index b37010f..b925147 100644
--- a/core/tests/Drupal/Tests/Core/DrupalTest.php
+++ b/core/tests/Drupal/Tests/Core/DrupalTest.php
@@ -67,7 +67,12 @@ public function testRequest() {
    * Tests the currentUser() method.
    */
   public function testCurrentUser() {
-    $this->setMockContainerService('current_user');
+    $auth_manager = $this->getMock('Drupal\Core\Authentication\AuthenticationManagerInterface');
+    $auth_manager->expects($this->once())
+      ->method('getAccount')
+      ->will($this->returnValue($this->getMock('Drupal\Core\Session\AccountInterface')));
+
+    $this->setMockContainerService('authentication', $auth_manager);
     $this->assertNotNull(\Drupal::currentUser());
   }
 
diff --git a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php
index 9197085..6e10992 100644
--- a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php
+++ b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php
@@ -141,15 +141,16 @@ function testProcessInbound() {
       ->method('getNegotiationMethodInstance')
       ->will($this->returnValue($method));
 
-    // Create a user stub.
-    $current_user = $this->getMockBuilder('Drupal\Core\Session\AccountInterface')
-      ->getMock();
+    $auth_manager = $this->getMock('Drupal\Core\Authentication\AuthenticationManagerInterface');
+    $auth_manager->expects($this->once())
+      ->method('getAccount')
+      ->will($this->returnValue($this->getMock('Drupal\Core\Session\AccountInterface')));
 
     // Create the processors.
     $alias_processor = new PathProcessorAlias($alias_manager);
     $decode_processor = new PathProcessorDecode();
     $front_processor = new PathProcessorFront($config_factory_stub);
-    $language_processor = new PathProcessorLanguage($config_factory_stub, new Settings(array()), $this->languageManager, $negotiator, $current_user);
+    $language_processor = new PathProcessorLanguage($config_factory_stub, new Settings(array()), $this->languageManager, $negotiator, $auth_manager);
 
     // First, test the processor manager with the processors in the incorrect
     // order. The alias processor will run before the language processor, meaning
