diff --git a/core/modules/user/lib/Drupal/user/Plugin/block/block/UserLoginBlock.php b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserLoginBlock.php
new file mode 100644
index 0000000..72e8da9
--- /dev/null
+++ b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserLoginBlock.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace Drupal\user\Plugin\block\block;
+
+use Drupal\block\BlockBase;
+use Drupal\Core\Annotation\Plugin;
+use Drupal\Core\Annotation\Translation;
+
+/**
+ * @Plugin(
+ *   id = "user_login_block",
+ *   subject = @Translation("User login"),
+ *   module = "user"
+ * )
+ */
+class UserLoginBlock extends BlockBase {
+
+  /**
+   * Implements BlockInterface::settings();
+   */
+  public function settings() {
+    return array(
+      'whois_new_count' => 5,
+    );
+  }
+
+  /**
+   * Implements BlockInterface::access().
+   */
+  public function access() {
+    global $user;
+    return (!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1))));
+  }
+
+  /**
+   * Implements BlockInterface::build().
+   */
+  public function build() {
+    return array(
+      drupal_get_form('user_login_block')
+    );
+  }
+}
diff --git a/core/modules/user/lib/Drupal/user/Plugin/block/block/UserNewBlock.php b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserNewBlock.php
new file mode 100644
index 0000000..b9ab4bc
--- /dev/null
+++ b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserNewBlock.php
@@ -0,0 +1,72 @@
+<?php
+
+namespace Drupal\user\Plugin\block\block;
+
+use Drupal\block\BlockBase;
+use Drupal\Core\Annotation\Plugin;
+use Drupal\Core\Annotation\Translation;
+
+/**
+ * @Plugin(
+ *   id = "user_online_block",
+ *   subject = @Translation("Who's new"),
+ *   module = "user"
+ * )
+ */
+class UserNewBlock extends BlockBase {
+
+  /**
+   * Implements BlockInterface::settings().
+   */
+  public function settings() {
+    return array(
+      'properties' => array(
+        'administrative' => TRUE
+      ),
+      'whois_new_count' => 5
+    );
+  }
+
+  /**
+   * Implements BlockInterface::access().
+   */
+  public function access() {
+    return user_access('access content');
+  }
+
+  /**
+   * Implements BlockInterface::configure().
+   */
+  public function configure($form, &$form_state) {
+    $form['user_block_whois_new_count'] = array(
+      '#type' => 'select',
+      '#title' => t('Number of users to display'),
+      '#default_value' => $this->configuration['whois_new_count'],
+      '#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)),
+    );
+    return $form;
+  }
+
+  /**
+   * Implements BlockInterface::configureSubmit().
+   */
+  public function configureSubmit($form, &$form_state) {
+    $this->configuration['whois_new_count'] = $form_state['values']['user_block_whois_new_count'];
+  }
+
+  /**
+   * Implements BlockInterface::build().
+   */
+  public function build() {
+    // Retrieve a list of new users who have subsequently accessed the site successfully.
+    $items = db_query_range('SELECT uid, name FROM {users} WHERE status <> 0 AND access <> 0 ORDER BY created DESC', 0, $this->configuration['whois_new_count'])->fetchAll();
+    $build = array(
+      '#theme' => 'item_list__user__new',
+      '#items' => array(),
+    );
+    foreach ($items as $account) {
+      $build['#items'][] = theme('username', array('account' => $account));
+    }
+    return $build;
+  }
+}
diff --git a/core/modules/user/lib/Drupal/user/Plugin/block/block/UserOnlineBlock.php b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserOnlineBlock.php
new file mode 100644
index 0000000..30fabe7
--- /dev/null
+++ b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserOnlineBlock.php
@@ -0,0 +1,92 @@
+<?php
+
+namespace Drupal\user\Plugin\block\block;
+
+use Drupal\block\BlockBase;
+use Drupal\Core\Annotation\Plugin;
+use Drupal\Core\Annotation\Translation;
+
+/**
+ * @Plugin(
+ *   id = "user_online_block",
+ *   subject = @Translation("Who's online"),
+ *   module = "user"
+ * )
+ */
+class UserOnlineBlock extends BlockBase {
+
+    /**
+   * Implements BlockInterface::settings().
+   */
+  public function settings() {
+    return array(
+      'properties' => array(
+        'administrative' => TRUE
+      ),
+      'seconds_online' => 900,
+      'max_list_count' => 10
+    );
+  }
+
+  /**
+   * Implements BlockInterface::access().
+   */
+  public function access() {
+    return user_access('access content');
+  }
+
+  /**
+   * Implements BlockInterface::configure().
+   */
+  public function configure($form, &$form_state) {
+    $period = drupal_map_assoc(array(30, 60, 120, 180, 300, 600, 900, 1800, 2700, 3600, 5400, 7200, 10800, 21600, 43200, 86400), 'format_interval');
+    $form['user_block_seconds_online'] = array(
+      '#type' => 'select',
+      '#title' => t('User activity'),
+      '#default_value' => $this->configuration['seconds_online'],
+      '#options' => $period,
+      '#description' => t('A user is considered online for this long after they have last viewed a page.')
+    );
+    $form['user_block_max_list_count'] = array(
+      '#type' => 'select',
+      '#title' => t('User list length'),
+      '#default_value' => $this->configuration['max_list_count'],
+      '#options' => drupal_map_assoc(array(0, 5, 10, 15, 20, 25, 30, 40, 50, 75, 100)),
+      '#description' => t('Maximum number of currently online users to display.')
+    );
+    return $form;
+  }
+
+  /**
+   * Implements BlockInterface::configureSubmit().
+   */
+  public function configureSubmit($form, &$form_state) {
+    $this->configuration['seconds_online'] = $form_state['values']['user_block_seconds_online'];
+    $this->configuration['max_list_count'] = $form_state['values']['user_block_max_list_count'];
+  }
+
+  /**
+   * Implements BlockInterface::build().
+   */
+  public function build() {
+    // Count users active within the defined period.
+    $interval = REQUEST_TIME - $this->configuration['max_list_count'];
+
+    // Perform database queries to gather online user lists. We use s.timestamp
+    // rather than u.access because it is much faster.
+    $authenticated_count = db_query("SELECT COUNT(DISTINCT s.uid) FROM {sessions} s WHERE s.timestamp >= :timestamp AND s.uid > 0", array(':timestamp' => $interval))->fetchField();
+
+    $build = array(
+      '#theme' => 'user_list',
+      '#prefix' => '<p>' . format_plural($authenticated_count, 'There is currently 1 user online.', 'There are currently @count users online.') . '</p>',
+    );
+
+    // Display a list of currently online users.
+    $max_users = $this->configuration['max_list_count'];
+    if ($authenticated_count && $max_users) {
+      $build['#users'] = db_query_range('SELECT u.uid, u.name, MAX(s.timestamp) AS max_timestamp FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= :interval AND s.uid > 0 GROUP BY u.uid, u.name ORDER BY max_timestamp DESC', 0, $max_users, array(':interval' => $interval))->fetchAll();
+    }
+
+    return $build;
+  }
+}
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index e42002b..0c31a9d 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -766,151 +766,26 @@ function user_login_block($form) {
 }
 
 /**
- * Implements hook_block_info().
- */
-function user_block_info() {
-  global $user;
-
-  $blocks['login']['info'] = t('User login');
-  // Not worth caching.
-  $blocks['login']['cache'] = DRUPAL_NO_CACHE;
-
-  $blocks['new']['info'] = t('Who\'s new');
-  $blocks['new']['properties']['administrative'] = TRUE;
-
-  // Too dynamic to cache.
-  $blocks['online']['info'] = t('Who\'s online');
-  $blocks['online']['cache'] = DRUPAL_NO_CACHE;
-  $blocks['online']['properties']['administrative'] = TRUE;
-
-  return $blocks;
-}
-
-/**
- * Implements hook_block_configure().
- */
-function user_block_configure($delta = '') {
-  global $user;
-
-  switch ($delta) {
-    case 'new':
-      $form['user_block_whois_new_count'] = array(
-        '#type' => 'select',
-        '#title' => t('Number of users to display'),
-        '#default_value' => variable_get('user_block_whois_new_count', 5),
-        '#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)),
-      );
-      return $form;
-
-    case 'online':
-      $period = drupal_map_assoc(array(30, 60, 120, 180, 300, 600, 900, 1800, 2700, 3600, 5400, 7200, 10800, 21600, 43200, 86400), 'format_interval');
-      $form['user_block_seconds_online'] = array('#type' => 'select', '#title' => t('User activity'), '#default_value' => variable_get('user_block_seconds_online', 900), '#options' => $period, '#description' => t('A user is considered online for this long after they have last viewed a page.'));
-      $form['user_block_max_list_count'] = array('#type' => 'select', '#title' => t('User list length'), '#default_value' => variable_get('user_block_max_list_count', 10), '#options' => drupal_map_assoc(array(0, 5, 10, 15, 20, 25, 30, 40, 50, 75, 100)), '#description' => t('Maximum number of currently online users to display.'));
-      return $form;
-  }
-}
-
-/**
- * Implements hook_block_save().
- */
-function user_block_save($delta = '', $edit = array()) {
-  global $user;
-
-  switch ($delta) {
-    case 'new':
-      variable_set('user_block_whois_new_count', $edit['user_block_whois_new_count']);
-      break;
-
-    case 'online':
-      variable_set('user_block_seconds_online', $edit['user_block_seconds_online']);
-      variable_set('user_block_max_list_count', $edit['user_block_max_list_count']);
-      break;
-  }
-}
-
-/**
- * Implements hook_block_view().
- */
-function user_block_view($delta = '') {
-  global $user;
-
-  $block = array();
-
-  switch ($delta) {
-    case 'login':
-      // For usability's sake, avoid showing two login forms on one page.
-      if (!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))) {
-
-        $block['subject'] = t('User login');
-        $block['content']['user_login_form'] = drupal_get_form('user_login_block');
-      }
-      return $block;
-
-    case 'new':
-      if (user_access('access content')) {
-        // Retrieve a list of new users who have subsequently accessed the site successfully.
-        $items = db_query_range('SELECT uid, name FROM {users} WHERE status <> 0 AND access <> 0 ORDER BY created DESC', 0, variable_get('user_block_whois_new_count', 5))->fetchAll();
-
-        $block['subject'] = t('Who\'s new');
-        $block['content'] = array(
-          '#theme' => 'item_list__user__new',
-          '#items' => array(),
-        );
-        foreach ($items as $account) {
-          $block['content']['#items'][] = theme('username', array('account' => $account));
-        }
-      }
-      return $block;
-
-    case 'online':
-      if (user_access('access content')) {
-        // Count users active within the defined period.
-        $interval = REQUEST_TIME - variable_get('user_block_seconds_online', 900);
-
-        // Perform database queries to gather online user lists. We use s.timestamp
-        // rather than u.access because it is much faster.
-        $authenticated_count = db_query("SELECT COUNT(DISTINCT s.uid) FROM {sessions} s WHERE s.timestamp >= :timestamp AND s.uid > 0", array(':timestamp' => $interval))->fetchField();
-
-        $block['subject'] = t('Who\'s online');
-        $block['content'] = array(
-          '#theme' => 'item_list__user__online',
-          '#items' => array(),
-          '#prefix' => '<p>' . format_plural($authenticated_count, 'There is currently 1 user online.', 'There are currently @count users online.') . '</p>',
-        );
-
-        // Display a list of currently online users.
-        $max_users = variable_get('user_block_max_list_count', 10);
-        if ($authenticated_count && $max_users) {
-          $items = db_query_range('SELECT u.uid, u.name, MAX(s.timestamp) AS max_timestamp FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= :interval AND s.uid > 0 GROUP BY u.uid, u.name ORDER BY max_timestamp DESC', 0, $max_users, array(':interval' => $interval))->fetchAll();
-
-          foreach ($items as $account) {
-            $block['content']['#items'][] = theme('username', array('account' => $account));
-          }
-        }
-      }
-      return $block;
-  }
-}
-
-/**
  * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function user_preprocess_block(&$variables) {
   if ($variables['block']->module == 'user') {
-    switch ($variables['block']->delta) {
-      case 'login':
+    switch ($variables['block']->id) {
+      case 'user_login_block':
         $variables['attributes']['role'] = 'form';
         break;
-      case 'new':
+      case 'user_new_block':
         $variables['attributes']['role'] = 'complementary';
         break;
-      case 'online':
+      case 'user_online_block':
         $variables['attributes']['role'] = 'complementary';
         break;
     }
   }
 }
 
+
+
 /**
  * Format a username.
  *
