diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/field/UserData.php b/core/modules/user/lib/Drupal/user/Plugin/views/field/UserData.php
index f0074fa..8443663 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/views/field/UserData.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/views/field/UserData.php
@@ -37,7 +37,7 @@ class UserData extends FieldPluginBase {
   public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
     parent::init($view, $display, $options);
 
-    $this->userData = drupal_container()->get('user.data');
+    $this->userData = \Drupal::service('user.data');
   }
 
   /**
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php b/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php
index 9abdab2..f74e6c2 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php
@@ -72,7 +72,7 @@ function testUserCancelUid1() {
     $password = user_password();
     $account = array(
       'name' => 'user1',
-      'pass' => drupal_container()->get('password')->hash(trim($password)),
+      'pass' => $this->container->get('password')->hash(trim($password)),
     );
     // We cannot use $account->save() here, because this would result in the
     // password being hashed again.
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php b/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php
index 4dd289b..786d8e2 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php
@@ -107,7 +107,7 @@ function testPasswordRehashOnLogin() {
     $default_count_log2 = 16;
 
     // Retrieve instance of password hashing algorithm
-    $password_hasher = drupal_container()->get('password');
+    $password_hasher = $this->container->get('password');
 
     // Create a new user and authenticate.
     $account = $this->drupalCreateUser(array());
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 924b221..0f05059 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -605,7 +605,7 @@ function user_validate_current_pass(&$form, &$form_state) {
     // form values like password_confirm that have their own validation
     // that prevent them from being empty if they are changed.
     if ((strlen(trim($form_state['values'][$key])) > 0) && ($form_state['values'][$key] != $account->$key)) {
-      $current_pass_failed = empty($form_state['values']['current_pass']) || !drupal_container()->get('password')->check($form_state['values']['current_pass'], $account);
+      $current_pass_failed = empty($form_state['values']['current_pass']) || !Drupal::service('password')->check($form_state['values']['current_pass'], $account);
       if ($current_pass_failed) {
         form_set_error('current_pass', t("Your current password is missing or incorrect; it's required to change the %name.", array('%name' => $name)));
         form_set_error($key);
@@ -1095,8 +1095,80 @@ function user_menu_title() {
 /**
  * Menu item title callback - use the user name.
  */
+<<<<<<< HEAD
 function user_page_title(UserInterface $account = NULL) {
   return $account ? $account->getUsername() : '';
+=======
+function user_page_title($account) {
+  return is_object($account) ? user_format_name($account) : '';
+}
+
+/**
+ * Form builder; the main user login form.
+ *
+ * @ingroup forms
+ */
+function user_login_form($form, &$form_state) {
+  // Display login form:
+  $form['name'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Username'),
+    '#size' => 60,
+    '#maxlength' => USERNAME_MAX_LENGTH,
+    '#description' => t('Enter your @s username.', array('@s' => config('system.site')->get('name'))),
+    '#required' => TRUE,
+    '#attributes' => array(
+      'autocorrect' => 'off',
+      'autocapitalize' => 'off',
+      'spellcheck' => 'false',
+      'autofocus' => 'autofocus',
+    ),
+  );
+
+  $form['pass'] = array(
+    '#type' => 'password',
+    '#title' => t('Password'),
+    '#size' => 60,
+    '#description' => t('Enter the password that accompanies your username.'),
+    '#required' => TRUE,
+  );
+
+  $form['actions'] = array('#type' => 'actions');
+  $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Log in'));
+
+  $form['#validate'] = user_login_default_validators();
+
+  return $form;
+}
+
+/**
+ * Set up a series for validators which check for blocked users,
+ * then authenticate against local database, then return an error if
+ * authentication fails. Distributed authentication modules are welcome
+ * to use hook_form_alter() to change this series in order to
+ * authenticate against their user database instead of the local users
+ * table. If a distributed authentication module is successful, it
+ * should set $form_state['uid'] to a user ID.
+ *
+ * We use three validators instead of one since external authentication
+ * modules usually only need to alter the second validator.
+ *
+ * @see user_login_name_validate()
+ * @return array
+ *   A simple list of validate functions.
+ */
+function user_login_default_validators() {
+  return array('user_login_name_validate');
+}
+
+/**
+ * A FAPI validate handler. Sets an error if supplied username has been blocked.
+ */
+function user_login_name_validate($form, &$form_state) {
+  if (!empty($form_state['values']['name']) && user_is_blocked($form_state['values']['name'])) {
+    // Blocked in user administration.
+    form_set_error('name', t('The username %name has not been activated or is blocked.', array('%name' => $form_state['values']['name'])));
+  }
 }
 
 /**
@@ -1114,7 +1186,7 @@ function user_authenticate($name, $password) {
   if (!empty($name) && !empty($password)) {
     $account = user_load_by_name($name);
     if ($account) {
-      $password_hasher = drupal_container()->get('password');
+      $password_hasher = Drupal::service('password');
       if ($password_hasher->check($password, $account)) {
         // Successful authentication.
         $uid = $account->id();
@@ -2016,7 +2088,7 @@ function user_modules_installed($modules) {
  */
 function user_modules_uninstalled($modules) {
   // Remove any potentially orphan module data stored for users.
-  drupal_container()->get('user.data')->delete($modules);
+  Drupal::service('user.data')->delete($modules);
 }
 
 /**
diff --git a/core/modules/user/user.pages.inc b/core/modules/user/user.pages.inc
index 6077a27..7a98d75 100644
--- a/core/modules/user/user.pages.inc
+++ b/core/modules/user/user.pages.inc
@@ -303,7 +303,7 @@ function user_cancel_confirm($account, $timestamp = 0, $hashed_pass = '') {
   $current = REQUEST_TIME;
 
   // Basic validation of arguments.
-  $account_data = drupal_container()->get('user.data')->get('user', $account->id());
+  $account_data = Drupal::service('user.data')->get('user', $account->id());
   if (isset($account_data['cancel_method']) && !empty($timestamp) && !empty($hashed_pass)) {
     // Validate expiration and hashed password/login.
     if ($timestamp <= $current && $current - $timestamp < $timeout && $account->id() && $timestamp >= $account->login && $hashed_pass == user_pass_rehash($account->pass, $timestamp, $account->login)) {
