diff --git includes/VersioncontrolAccount.php includes/VersioncontrolAccount.php
deleted file mode 100644
index 91d6bdc..0000000
--- includes/VersioncontrolAccount.php
+++ /dev/null
@@ -1,154 +0,0 @@
-<?php
-// $Id: VersioncontrolAccount.php,v 1.12 2010/12/06 03:23:44 marvil07 Exp $
-/**
- * @file
- * Account class
- */
-
-/**
- * Account class
- *
- * This class provides the way to manage users accounts.
- */
-abstract class VersioncontrolAccount extends VersioncontrolEntity {
-  /**
-   * The username, as it is represented by the VCS.
-   *
-   * @var string
-   */
-  public $vcs_username = '';
-
-  /**
-   * The uid of the associated Drupal user.
-   *
-   * If 0, indicates that there is no known associated Drupal user. Code using
-   * this class should construct their behaviors to respect this magic value.
-   *
-   * @var int
-   */
-  public $uid = 0;
-
-  public $repo_id;
-
-  /**
-   * Update a VCS user account in the database, and call the necessary
-   * module hooks. The account repository and uid must stay the same values as
-   * the one given on account creation, whereas vcs_username and
-   * data data members can change.
-   *
-   * FIXME use same logic as in other classes, this probably would
-   * be changed only when we get account_id PK schema change in.
-   * TODO review performance impact of updating the vcs_username since
-   * original jpetso work try to avoid to update if not needed by passing
-   * it as parameter.
-   */
-  public function update($options = array()) {
-    // Append default options.
-    $options += $this->defaultCrudOptions['update'];
-
-    $repo_id = $this->repository->repo_id;
-
-    db_query("UPDATE {versioncontrol_accounts}
-      SET vcs_username = '%s'
-      WHERE uid = %d AND repo_id = %d",
-      $this->vcs_username, $this->uid, $repo_id
-    );
-
-    // Update operations table.
-    // this is assuming 1-1 relation between accounts and uid's
-    //   1. unassign all uid related operations
-    db_query('update {versioncontrol_operations}
-              set author_uid = 0
-              where author_uid = %d and repo_id = %d',
-              $this->uid, $this->repository->repo_id);
-    db_query('update {versioncontrol_operations}
-              set committer_uid = 0
-              where committer_uid = %d and repo_id = %d',
-              $this->uid, $this->repository->repo_id);
-    //   2. assingn all operations related to repo and vcs username
-    db_query("UPDATE {versioncontrol_operations}
-              SET author_uid = %d
-              WHERE author = '%s' AND repo_id = %d",
-              $this->uid, $this->vcs_username, $this->repository->repo_id);
-    db_query("UPDATE {versioncontrol_operations}
-              SET committer_uid = %d
-              WHERE committer = '%s' AND repo_id = %d",
-              $this->uid, $this->vcs_username, $this->repository->repo_id);
-    // not using data field for now, but backends can
-
-    // Let the backend take action.
-    $this->backendUpdate($options);
-
-    // Everything's done, invoke the hook.
-    module_invoke_all('versioncontrol_entity_account_update', $this);
-    return $this;
-  }
-
-  /**
-   * Insert a VCS user account into the database,
-   * and call the necessary module hooks.
-   *
-   * FIXME use same logic as in other classes, this probably would
-   * be changed only when we get account_id PK schema change in.
-   */
-  public function insert($options = array()) {
-    // Append default options.
-    $options += $this->defaultCrudOptions['insert'];
-
-    // not using data field for now, but backends can
-    db_query(
-      "INSERT INTO {versioncontrol_accounts} (uid, repo_id, vcs_username)
-       VALUES (%d, %d, '%s')", $this->uid, $this->repository->repo_id, $this->vcs_username
-    );
-
-    // Provide an opportunity for the backend to add its own stuff.
-    $this->backendInsert($options);
-
-    // Update the operations table.
-    db_query("UPDATE {versioncontrol_operations}
-              SET author_uid = %d
-              WHERE author = '%s' AND repo_id = %d",
-              $this->uid, $this->vcs_username, $this->repository->repo_id);
-    db_query("UPDATE {versioncontrol_operations}
-              SET committer_uid = %d
-              WHERE committer = '%s' AND repo_id = %d",
-              $this->uid, $this->vcs_username, $this->repository->repo_id);
-
-    // Everything's done, invoke the hook.
-    module_invoke_all('versioncontrol_entity_account_insert', $this);
-    return $this;
-  }
-
-  /**
-   * Delete a VCS user account from the database, set all commits with this
-   * account as author to user 0 (anonymous), and call the necessary hooks.
-   *
-   * FIXME use same logic as in other classes, this probably would
-   * be changed only when we get account_id PK schema change in.
-   */
-  public function delete($options = array()) {
-    // Append default options.
-    $options += $this->defaultCrudOptions['delete'];
-
-    // Update the operations table.
-    db_query('update {versioncontrol_operations}
-              set author_uid = 0
-              where author_uid = %d and repo_id = %d',
-              $this->uid, $this->repository->repo_id);
-    db_query('update {versioncontrol_operations}
-              set committer_uid = 0
-              where committer_uid = %d and repo_id = %d',
-              $this->uid, $this->repository->repo_id);
-
-    db_delete('versioncontrol_accounts')
-      ->condition('uid', $this->uid)
-      ->condition('repo_id', $this->repo_id)
-      ->execute();
-
-    // Provide an opportunity for the backend to delete its own stuff.
-    $this->backendDelete($options);
-
-    module_invoke_all('versioncontrol_entity_account_delete', $this);
-  }
-
-}
diff --git includes/VersioncontrolRepository.php includes/VersioncontrolRepository.php
index 517fa63..e97f87e 100644
--- includes/VersioncontrolRepository.php
+++ includes/VersioncontrolRepository.php
@@ -226,11 +226,6 @@ abstract class VersioncontrolRepository implements VersioncontrolEntityInterface
     return $this->backend->loadEntities('operation', $ids, $conditions, $options);
   }
 
-  public function loadAccounts($ids = array(), $conditions = array(), $options = array()) {
-    $conditions['repo_id'] = $this->repo_id;
-    return $this->backend->loadEntities('account', $ids, $conditions, $options);
-  }
-
   /**
    * Return TRUE if the account is authorized to commit in the actual
    * repository, or FALSE otherwise. Only call this function on existing
@@ -336,10 +331,6 @@ abstract class VersioncontrolRepository implements VersioncontrolEntityInterface
       foreach ($this->loadCommits() as $commit) {
         $commit->delete();
       }
-      // FIXME accounts are changing significantly, this will need to, too
-      foreach ($this->loadAccounts() as $account) {
-        $account->delete();
-      }
     }
 
     db_delete('versioncontrol_repositories')
diff --git includes/controllers.inc includes/controllers.inc
index 361737d..2c955cf 100644
--- includes/controllers.inc
+++ includes/controllers.inc
@@ -414,52 +414,6 @@ class VersioncontrolRepositoryController extends VersioncontrolEntityController
   protected function extendData(&$queried_entities) {}
 }
 
-class VersioncontrolAccountController extends VersioncontrolEntityController {
-  protected $entityType = 'account';
-  protected $baseTable = 'versioncontrol_accounts';
-  protected $idKey = 'uid';
-
-  protected function executeQuery(&$query) {
-    $result = $query->execute();
-    if ($this->options['repository'] instanceof VersioncontrolRepository) {
-      return $result->fetchAllAssoc('uid');
-    }
-    else { // No repository specified, create a specially-keyed array
-      $return = array();
-      foreach ($result as $row) {
-        if (!isset($return[$row->uid])) {
-          $return[$row->uid] = array();
-        }
-        $return[$row->uid][$row->repo_id] = $row;
-      }
-      return $return;
-    }
-  }
-
-  protected function buildEntities(&$queried_entities) {
-    // If a repository is attached, the default parent implementation is fine
-    if ($this->options['repository'] instanceof VersioncontrolRepository) {
-      return parent::buildEntities($queried_entities);
-    }
-    // Otherwise we need special handling for our two-level array.
-    $almost_built = array();
-    foreach ($queried_entities as $uid => $raw_accounts_per_repo) {
-      foreach ($raw_accounts_per_repo as $repo_id => $raw_account) {
-        $id = "$uid-$repo_id";
-        // load the repository object
-        $raw_account->repository = $this->backends[$raw_account->vcs]->loadEntity('repo', array($repo_id));
-        $almost_built[$id] = $raw_account;
-      }
-    }
-    return parent::buildEntities($almost_built);
-  }
-
-  protected function modifyReturn($entities) {
-    // by now, return the same
-    return $entities;
-  }
-}
-
 class VersioncontrolBranchController extends VersioncontrolEntityController {
   protected $entityType = 'branch';
   protected $baseTable = 'versioncontrol_labels';
diff --git tests/VersioncontrolBackendTests.test tests/VersioncontrolBackendTests.test
index b8ab805..ce8c8b1 100644
--- tests/VersioncontrolBackendTests.test
+++ tests/VersioncontrolBackendTests.test
@@ -31,7 +31,7 @@ class VersioncontrolBackendBaseUnitTest extends VersioncontrolTestCase {
     // As soon as the backend is initialized, the base class should have a bunch
     // of classes declared on it and available for factory operations. Check.
     // This also has the effect of ensuring autoload declarations are in place.
-    $types = array('repo', 'account', 'operation', 'item', 'branch', 'tag');
+    $types = array('repo', 'operation', 'item', 'branch', 'tag');
     foreach ($this->backends as $backend) { // Iterate over all available backends.
       foreach ($types as $type) { // Iterate over each entity type.
         $this->assertTrue(isset($backend->classesEntities[$type]), "$backend->name backend declares an entity class for type '$type'", 'PHP');
diff --git tests/versioncontrol_test.inc tests/versioncontrol_test.inc
index e88775f..d9fd686 100644
--- tests/versioncontrol_test.inc
+++ tests/versioncontrol_test.inc
@@ -17,7 +17,6 @@ class VersioncontrolTestBackend extends VersioncontrolBackend {
     );
     $this->classesEntities = array(
       'repo'      => 'VersioncontrolTestRepository',
-      'account'   => 'VersioncontrolTestAccount',
       'operation' => 'VersioncontrolTestOperation',
       'item'      => 'VersioncontrolTestItem',
       'branch'    => 'VersioncontrolTestBranch',
@@ -30,9 +29,6 @@ class VersioncontrolTestBackend extends VersioncontrolBackend {
 class VersioncontrolTestRepository extends VersioncontrolRepository {
 }
 
-class VersioncontrolTestAccount extends VersioncontrolAccount {
-}
-
 class VersioncontrolTestOperation extends VersioncontrolOperation {
 
   /**
diff --git versioncontrol.admin.inc versioncontrol.admin.inc
index 686e8d2..493f2d2 100644
--- versioncontrol.admin.inc
+++ versioncontrol.admin.inc
@@ -82,258 +82,6 @@ function versioncontrol_admin_settings_submit($form, &$form_state) {
   }
 }
 
-
-/**
- * Form callback for "admin/project/versioncontrol-accounts":
- * A list of accounts with filtering possibilities.
- *
- * TODO Completely reimplement in Views.
- */
-function versioncontrol_admin_account_list_form(&$form_state) {
-  // Retrieve a list of all repositories with registered VCS accounts.
-  $result = db_query('SELECT DISTINCT repo_id FROM {versioncontrol_accounts}');
-  $repo_ids = array();
-
-  while ($repo_id = db_result($result)) {
-    $repo_ids[] = $repo_id;
-  }
-  $repositories = versioncontrol_repository_load_multiple($repo_ids);
-
-  $filter_form = versioncontrol_admin_account_list_filter_form($form_state, $repositories);
-  $filter_form['#id'] = 'versioncontrol-account-filter-form';
-  drupal_alter('form', $filter_form, $form_state, 'versioncontrol_admin_account_list_filter_form');
-
-  $form = array();
-  $form['filters'] = array_merge($filter_form, array(
-    '#type' => 'fieldset',
-    '#title' => t('Filter'),
-    '#collapsible' => TRUE,
-    '#collapsed' => FALSE,
-    '#prefix' => '<div class="container-inline">',
-    '#suffix' => '</div>',
-  ));
-
-  // Filter the list of accounts.
-  $accounts = versioncontrol_user_accounts_load_multiple(array(), array(), array('include unauthorized' => TRUE));
-
-  foreach (module_implements('versioncontrol_filter_accounts') as $module) {
-    $function = $module .'_versioncontrol_filter_accounts';
-    $function($accounts);
-  }
-  $accounts = versioncontrol_admin_get_paged_accounts($accounts);
-  $users = array();
-
-  // Retrieve more info for the accounts that survived filtering.
-  foreach ($accounts as $uid => $usernames_by_repository) {
-    $user = user_load($uid);
-    if (!$user) {
-      unset($accounts[$uid]);
-      continue;
-    }
-    $users[$uid] = $user;
-  }
-  if (empty($users)) {
-    $form['empty'] = array(
-      '#type' => 'markup',
-      '#value' => '<p>'. t('No accounts could be found with the current filter settings.') .'</p>',
-    );
-    return $form;
-  }
-
-  // Retrieve total, first and last commits of each user.
-  $statistics = VersioncontrolOperationCache::getInstance()->getStatistics(array(
-    'types' => array(VERSIONCONTROL_OPERATION_COMMIT),
-    'uids' => array_keys($users),
-  ), array(
-    'group_by' => array('uid'),
-  ));
-
-  $total_operations = array();
-  $first_operation_dates = array();
-  $last_operation_dates = array();
-
-  foreach ($statistics as $user_stats) {
-    $total_operations[$user_stats->uid] = $user_stats->total_operations;
-    $first_operation_dates[$user_stats->uid] = t('!time ago', array(
-      '!time' => format_interval(time() - $user_stats->first_operation_date, 1))
-    );
-    $last_operation_dates[$user_stats->uid] = t('!time ago', array(
-      '!time' => format_interval(time() - $user_stats->last_operation_date, 1))
-    );
-    if (module_exists('commitlog')) {
-      $total_operations[$user_stats->uid] =
-        l($total_operations[$user_stats->uid], 'user/'. $user_stats->uid .'/track/code');
-    }
-  }
-
-  // Construct the user account table.
-  $header = array(t('User'), t('Accounts'), t('Commits'), t('First commit'), t('Last commit'));
-  $rows_by_uid = array();
-  foreach ($accounts as $uid => $usernames_by_repository) {
-    $user = $users[$uid];
-
-    // Present a list of all VCS usernames and the repository where they're in.
-    $repo_usernames = array();
-    foreach ($usernames_by_repository as $repo_id => $account) {
-      if (!isset($repositories[$repo_id])) { // happens if the backend isn't loaded
-        continue;
-      }
-      $formatted_username = theme('versioncontrol_account_username',
-        $uid, $account->vcs_username, $repositories[$repo_id],
-        array('prefer_drupal_username' => FALSE)
-      );
-      $repo_name = module_exists('commitlog')
-        ? theme('commitlog_repository', $repositories[$repo_id])
-        : check_plain($repositories[$repo_id]['name']);
-
-      $repo_usernames[] = t('!username in !repository (!edit)', array(
-        '!username' => $formatted_username,
-        '!repository' => $repo_name,
-        '!edit' => l(t('edit'),
-          'user/'. $uid .'/edit/versioncontrol/'. $repo_id .'/'. drupal_urlencode($account->vcs_username)
-        ),
-      ));
-    }
-    $vcs_usernames = empty($repo_usernames)
-      ? t('VCS backend is currently disabled')
-      : theme('item_list', $repo_usernames);
-
-    $rows_by_uid[$uid] = array(
-      theme('username', $user), $vcs_usernames,
-      isset($total_operations[$uid]) ? $total_operations[$uid] : 0,
-      isset($first_operation_dates[$uid]) ? $first_operation_dates[$uid] : t('n/a'),
-      isset($last_operation_dates[$uid]) ? $last_operation_dates[$uid] : t('n/a'),
-    );
-  }
-
-  // Provide a possibility for backends and other modules to modify the list.
-  foreach (module_implements('versioncontrol_alter_account_list') as $module) {
-    $function = $module .'_versioncontrol_alter_account_list';
-    $function($accounts, $repositories, $header, $rows_by_uid);
-  }
-  // We don't want the uids in the final $rows array.
-  $rows = array_values($rows_by_uid);
-
-  // The finished user account list with account filter.
-  $form['accounts'] = array(
-    '#type' => 'markup',
-    '#value' => theme('table', $header, $rows),
-  );
-
-  if ($pager = theme('pager', NULL, variable_get('versioncontrol_admin_account_pager', 20), 0)) {
-    $form['pager'] = array(
-      '#type' => 'markup',
-      '#value' => $pager,
-    );
-  }
-  return $form;
-}
-
-/**
- * Return a subset of the given accounts (10 Drupal users by default, and all
- * of their VCS usernames). Paging is also used by emulating pager_query().
- */
-function versioncontrol_admin_get_paged_accounts($accounts, $element = 0) {
-  global $pager_page_array, $pager_total, $pager_total_items;
-  $page = isset($_GET['page']) ? $_GET['page'] : '';
-  $pager_page_array = explode(',', $page);
-  $page = empty($pager_page_array[$element]) ? 0 : $pager_page_array[$element];
-
-  $limit = variable_get('versioncontrol_admin_account_pager', 20);
-  $i = 0;
-  $paged_accounts = array();
-
-  foreach ($accounts as $uid => $usernames_by_repository) {
-    if ($i >= ($page * $limit) && $i < (($page+1) * $limit)) {
-      $paged_accounts[$uid] = $usernames_by_repository;
-    }
-    ++$i;
-  }
-
-  // Emulate pager_query() in order to get a proper theme('pager').
-  $pager_total_items[$element] = count($accounts);
-  $pager_total[$element] = ceil($pager_total_items[$element] / $limit);
-  $pager_page_array[$element] = max(0, min((int)$pager_page_array[$element], ((int)$pager_total[$element]) - 1));
-
-  return $paged_accounts;
-}
-
-/**
- * A form for filtering accounts which is embedded in the account list page.
- */
-function versioncontrol_admin_account_list_filter_form(&$form_state, $repositories) {
-  $form = array();
-  $repository_names = array(0 => t('All'));
-
-  foreach ($repositories as $repo_id => $repository) {
-    $repository_names[$repo_id] = check_plain($repository['name']);
-  }
-  if (!isset($_SESSION['versioncontrol_filter_repo_id'])) {
-    $_SESSION['versioncontrol_filter_repo_id'] = 0;
-  }
-
-  $form['#id'] = 'versioncontrol-account-filter-form';
-
-  $form['repo_id'] = array(
-    '#type' => 'select',
-    '#title' => t('Repository'),
-    '#options' => $repository_names,
-    '#default_value' => $_SESSION['versioncontrol_filter_repo_id'],
-    '#weight' => 10,
-  );
-  $form['submit'] = array(
-    '#type' => 'submit',
-    '#value' => t('Filter'),
-    '#submit' => array('versioncontrol_admin_account_list_filter_form_submit'),
-    '#weight' => 100,
-  );
-  return $form;
-}
-
-/**
- * Submit handler for the account filter form.
- */
-function versioncontrol_admin_account_list_filter_form_submit($form, &$form_state) {
-  $_SESSION['versioncontrol_filter_repo_id'] = $form_state['values']['repo_id'];
-}
-
-/**
- * Implementation of hook_versioncontrol_filter_accounts():
- * Unset filtered accounts before they are even attempted to be displayed
- * on the account list.
- *
- * TODO remove, obsoleted by Views
- *
- * @param $accounts
- *   The accounts that would normally be displayed, in the same format as the
- *   return value of versioncontrol_user_accounts_load_multiple(). Entries in
- *   this list may be unset by this filter function.
- */
-function versioncontrol_versioncontrol_filter_accounts(&$accounts) {
-  if (empty($accounts)) {
-    return;
-  }
-  if (!isset($_SESSION['versioncontrol_filter_repo_id'])) {
-    $_SESSION['versioncontrol_filter_repo_id'] = 0;
-  }
-  $filter_repo_id = $_SESSION['versioncontrol_filter_repo_id'];
-
-  if ($filter_repo_id == 0) {
-    return; // Don't change the list if "All" repositories are selected.
-  }
-
-  foreach ($accounts as $uid => $usernames_by_repository) {
-    foreach ($usernames_by_repository as $repo_id => $username) {
-      if ($repo_id != $filter_repo_id) {
-        unset($accounts[$uid][$repo_id]);
-        if (empty($accounts[$uid])) {
-          unset($accounts[$uid]);
-        }
-      }
-    }
-  }
-}
-
 /**
  * Form callback for "admin/project/versioncontrol-repositories":
  * A simple list of repositories, sorted by version control system.
diff --git versioncontrol.info versioncontrol.info
index 670c0f7..3b0e7c1 100644
--- versioncontrol.info
+++ versioncontrol.info
@@ -5,7 +5,6 @@ dependencies[] = autoload
 dependencies[] = dbtng
 dependencies[] = ctools
 dependencies[] = views
-files[] = includes/VersioncontrolAccount.php
 files[] = includes/VersioncontrolBackend.php
 files[] = includes/VersioncontrolBranch.php
 files[] = includes/VersioncontrolItem.php
diff --git versioncontrol.module versioncontrol.module
index 0254402..6084407 100644
--- versioncontrol.module
+++ versioncontrol.module
@@ -131,11 +131,11 @@ function versioncontrol_theme() {
 
 /**
  * Implementation of hook_user():
- * Register additional user account edit tabs,
  * and delete VCS accounts when the associated user account is deleted.
  */
 function versioncontrol_user($type, &$edit, &$user, $category = NULL) {
   switch ($type) {
+    // Register additional user account edit tabs,
     case 'categories':
       $categories = array();
       $categories[] = array(
@@ -145,16 +145,6 @@ function versioncontrol_user($type, &$edit, &$user, $category = NULL) {
         'weight' => 99,
       );
       return $categories;
-
-    case 'delete':
-      $accounts = versioncontrol_user_accounts_load($user->uid, TRUE);
-      foreach ($accounts as $uid => $usernames_by_repository) {
-        foreach ($usernames_by_repository as $repo_id => $account) {
-          $account->delete();
-        }
-      }
-      break;
-
   }
 }
 
@@ -253,26 +243,7 @@ function versioncontrol_menu() {
     'type' => MENU_CALLBACK,
   ) + $admin;
 
-  $items['admin/project/versioncontrol-accounts'] = array(
-    'title' => 'VCS accounts',
-    'description' => 'Manage associations of Drupal users to VCS user accounts.',
-    'page arguments' => array('versioncontrol_admin_account_list_form'),
-    'type' => MENU_NORMAL_ITEM,
-  ) + $admin;
-  $items['admin/project/versioncontrol-accounts/list'] = array(
-    'title' => 'List',
-    'type' => MENU_DEFAULT_LOCAL_TASK,
-    'weight' => 0,
-  );
-
   // Account registration and editing pages for the regular user.
-  $items['versioncontrol/register'] = array(
-    'title' => 'Get commit access',
-    'page callback' => 'versioncontrol_account_register_page',
-    'access callback' => TRUE, // access checking is done in the page callback
-    'file' => 'versioncontrol.pages.inc',
-    'type' => MENU_SUGGESTED_ITEM,
-  );
   $items['user/%versioncontrol_user_accounts/edit/versioncontrol'] = array(
     // Load with $include_unauthorized == TRUE, so that the user can inspect
     // his/her VCS accounts even if they are not approved by the admin yet.
diff --git versioncontrol.pages.inc versioncontrol.pages.inc
index 46ff844..3dda8f4 100644
--- versioncontrol.pages.inc
+++ versioncontrol.pages.inc
@@ -17,116 +17,6 @@
 define('VERSIONCONTROL_REGISTER_DEMO', -1);
 
 /**
- * Form callback for "versioncontrol/register[/$register_uid[/$register_at_repo_id]]":
- * Provide an indirection that leads to an account registration form.
- */
-function versioncontrol_account_register_page($register_uid = FALSE, $register_at_repo_id = FALSE) {
-  global $user;
-
-  if ($user->uid == 0 || !versioncontrol_user_access()) {
-    $presets = _versioncontrol_get_string_presets();
-
-    return variable_get(
-      'versioncontrol_registration_message_unauthorized',
-      $presets['versioncontrol_registration_message_unauthorized']
-    );
-  }
-
-  if ($register_uid == 'demo') {
-    $register_uid = VERSIONCONTROL_REGISTER_DEMO;
-  }
-  else {
-    $register_uid = is_numeric($register_uid) ? $register_uid : $user->uid;
-  }
-
-  $admin_access = versioncontrol_admin_access();
-
-  if (!$admin_access && $register_uid != $user->uid) {
-    drupal_access_denied();
-    return;
-  }
-
-  $accounts = versioncontrol_user_accounts_load($register_uid, TRUE);
-  $repositories = versioncontrol_repository_load_multiple(FALSE);
-
-  // Construct the '#options' array.
-  $account_usernames = array();
-  foreach ($accounts as $uid => $usernames_by_repository) {
-    foreach ($usernames_by_repository as $repo_id => $account) {
-      $account_usernames[$repo_id][] = $account->vcs_username;
-    }
-  }
-
-  if ($register_uid == VERSIONCONTROL_REGISTER_DEMO) {
-    $account_usernames = array();
-  }
-
-  $repository_names = array();
-  foreach ($repositories as $repo_id => $repository) {
-    if (isset($account_usernames[$repo_id])
-        && $repository->isAccountAuthorized($register_uid)) {
-      // We only want repositories in the list of repositories that are open
-      // for registrations where no (authorized) account exists yet.
-      continue;
-    }
-    if (!isset($first_repo_id)) {
-      $first_repo_id = $repo_id;
-    }
-    $repository_names[$repo_id] = check_plain($repository['name']);
-  }
-
-  // Filter (and possibly change the caption of) the list of repositories to
-  // select. The admin has all the permissions and gets the uncensored list.
-  if (!$admin_access) {
-    foreach (module_implements('versioncontrol_alter_repository_selection') as $module) {
-      $function = $module .'_versioncontrol_alter_repository_selection';
-      $function($repository_names, $repositories);
-    }
-  }
-
-  // If there's just one repository on the site, redirect directly to this one.
-  if (count($repository_names) == 1) {
-    $only_repo_id = $first_repo_id;
-  }
-  elseif (count($repositories) == 1) {
-    $only_repo_id = reset(array_keys($repositories));
-  }
-
-  if ($register_uid == VERSIONCONTROL_REGISTER_DEMO) {
-    unset($only_repo_id);
-  }
-
-  if (is_numeric($register_at_repo_id) || isset($only_repo_id)) {
-    // If there is only one repository left to register, it doesn't matter
-    // whether or not the URL contains a repository (and which one), we always
-    // redirect to the remaining possible one. Otherwise, we try to register
-    // at the given repository.
-    $repo_id = isset($only_repo_id) ? $only_repo_id : $register_at_repo_id;
-
-    if (isset($account_usernames[$repo_id])) {
-      drupal_set_message(t('You already have a registered account.'));
-      drupal_goto('user/'. $user->uid .'/edit/versioncontrol/'. $repo_id
-                  .'/'. reset($account_usernames[$repo_id]));
-      // drupal_goto() calls exit() so script execution ends right here
-    }
-    elseif (isset($repository_names[$repo_id])) {
-      return drupal_get_form('versioncontrol_account_edit_form',
-        $register_uid, $repositories[$repo_id], VERSIONCONTROL_FORM_CREATE
-      );
-    }
-  }
-
-  if (!isset($first_repo_id)) {
-    // when there are no repos, this var is not set
-    $first_repo_id = NULL;
-  }
-
-  return drupal_get_form('versioncontrol_account_register_form',
-    $register_uid, $repository_names, $first_repo_id
-  );
-}
-
-/**
  * Implementation of hook_versioncontrol_alter_repository_selection():
  * Alter the list of repositories that are available for user registration
  * and editing. This hook is called for all users except those with
@@ -502,65 +392,3 @@ function versioncontrol_account_edit_form_validate($form, &$form_state) {
     }
   }
 }
-
-/**
- * Add or update the user account when the edit/register form is submitted.
- */
-function versioncontrol_account_edit_form_submit($form, &$form_state) {
-  // Reconstruct the user data from the $form_state that was passed.
-  $uid = $form['#uid'];
-  $vcs_username = $form_state['values']['account_name'];
-  $repository = $form['#repository'];
-  $vcs_name = $form['#vcs_name'];
-
-  // Let other modules provide additional account data.
-  $additional_data = array();
-  foreach (module_implements('versioncontrol_account_submit') as $module) {
-    $function = $module .'_versioncontrol_account_submit';
-    $function($additional_data, $form, $form_state);
-  }
-
-  if (empty($form['#original_username'])) {
-    $data = array(
-      'vcs_username' => $vcs_username,
-      'uid' => $uid,
-      'repository' => $repository,
-    );
-    $vcs_account = $repository->getBackend()->buildEntity('account', $data);
-    $vcs_account->additional_data = $additional_data;
-    $vcs_account->insert();
-    $message = drupal_set_message(t(
-      'The @vcs account %vcs_username has been registered.',
-      array('@vcs' => $vcs_name, '%vcs_username' => $vcs_username)
-    ));
-  }
-  else {
-    //FIXME why username are a required constraint? <-- shouldn't be anymore
-    //      uid and repo_id are the PK on the table getAccounts query
-    $conditions = array(
-      'repo_id' => array($repository->repo_id),
-      'vcs_username' => array($form['#original_username'])
-    );
-    $vcs_accounts = versioncontrol_user_accounts_load_multiple(array($uid), $conditions, array('include unauthorized' => TRUE));
-    // if we got an original_username we can trust on getting a value
-    $vcs_account = array_shift($vcs_accounts);
-
-    $vcs_account->vcs_username = $vcs_username;
-    $vcs_account->additional_data = $additional_data;
-    $vcs_account->update();
-
-    // Regular users cannot change the username, and will probably get
-    // a message for each of the other actions that hook into the form.
-    if (versioncontrol_admin_access()) {
-      $message = drupal_set_message(t(
-        'The @vcs account %username has been updated successfully.',
-        array('@vcs' => $vcs_name, '%username' => $vcs_username)
-      ));
-    }
-  }
-
-  $form_state['redirect'] = versioncontrol_admin_access()
-    ? 'admin/project/versioncontrol-accounts'
-    : 'user/'. $uid .'/edit/versioncontrol/'. $repository->repo_id
-        .'/'. drupal_urlencode($vcs_username);
-}
diff --git versioncontrol_account_status/versioncontrol_account_status.install versioncontrol_account_status/versioncontrol_account_status.install
index 519a53d..9455ea2 100644
--- versioncontrol_account_status/versioncontrol_account_status.install
+++ versioncontrol_account_status/versioncontrol_account_status.install
@@ -19,6 +19,12 @@ function versioncontrol_account_status_schema() {
     'description' =>
       'A table describing the approval status of a user account in an associated repository. The Version Control Account Status module maps the approval status to the the Version Control API\'s concept of "authorized accounts".',
     'fields' => array(
+      'account_id' => array(
+        'description' => 'The primary identifier for an account.',
+        'type' => 'serial',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+      ),
       'uid' => array(
         'description' => 'The Drupal user id of the applying user, referring to both {users}.uid and {versioncontrol_accounts}.uid.',
         'type' => 'int',
@@ -47,7 +53,7 @@ function versioncontrol_account_status_schema() {
         'default' => 0,
       ),
     ),
-    'primary key' => array('uid', 'repo_id'),
+    'primary key' => array('account_id'),
   );
 
   $schema['versioncontrol_account_status_strings'] = array(
@@ -128,3 +134,19 @@ function versioncontrol_account_status_uninstall() {
   // Remove tables.
   drupal_uninstall_schema('versioncontrol_account_status');
 }
+
+/**
+ * Change the main schema to let drupal users have more than one account.
+ */
+function versioncontrol_account_status_update_6301() {
+  $ret = array();
+  $account_id = array(
+    'description' => 'The primary identifier for an account.',
+    'type' => 'serial',
+    'unsigned' => TRUE,
+    'not null' => TRUE,
+  );
+  db_add_field($ret, 'versioncontrol_account_status_users', 'account_id', $account_id);
+  db_drop_primary_key($ret, 'versioncontrol_account_status_users');
+  db_add_primary_key($ret, 'versioncontrol_account_status_users', array('account_id'));
+}
diff --git versioncontrol_account_status/versioncontrol_account_status.module versioncontrol_account_status/versioncontrol_account_status.module
index 5db3a76..5b5558d 100644
--- versioncontrol_account_status/versioncontrol_account_status.module
+++ versioncontrol_account_status/versioncontrol_account_status.module
@@ -126,7 +126,7 @@ function _versioncontrol_account_status_get_conditions($default_condition_descri
  *         The user doesn't have repository access anymore.
  */
 function versioncontrol_account_status_get($uid, $repo_id) {
-  $result = db_query('SELECT uid, repo_id, motivation, status
+  $result = db_query('SELECT account_id, uid, repo_id, motivation, status
                       FROM {versioncontrol_account_status_users}
                       WHERE uid = %d AND repo_id = %d', $uid, $repo_id);
 
@@ -151,14 +151,12 @@ function versioncontrol_account_status_get($uid, $repo_id) {
  *   of versioncontrol_account_status_get().
  */
 function versioncontrol_account_status_set($status_data) {
-  db_query('DELETE FROM {versioncontrol_account_status_users}
-            WHERE uid = %d AND repo_id = %d',
-            $status_data['uid'], $status_data['repo_id']);
-  db_query("INSERT INTO {versioncontrol_account_status_users}
-            (uid, repo_id, motivation, status)
-            VALUES (%d, %d, '%s', %d)",
-            $status_data['uid'], $status_data['repo_id'],
-            $status_data['motivation'], $status_data['status']);
+  if (!empty($status_data['account_id'])) {
+    drupal_write_record('versioncontrol_account_status_users', $status_data, array('account_id'));
+  }
+  else {
+    drupal_write_record('versioncontrol_account_status_users', $status_data);
+  }
 }
 
 /**
@@ -357,8 +355,7 @@ function versioncontrol_account_status_account_filter_form_submit($form, &$form_
 
 /**
  * Implementation of hook_versioncontrol_filter_accounts():
- * Unset filtered accounts before they are even attempted to be displayed
- * on the account list.
+ * TODO remove, obsoleted by Views
  *
  * @param $accounts
  *   The accounts that would normally be displayed, in the same format as the
@@ -374,10 +371,45 @@ function versioncontrol_account_status_versioncontrol_filter_accounts(&$accounts
   }
   $filter_status = $_SESSION['versioncontrol_account_status_filter'];
 
-  if ($filter_status == VERSIONCONTROL_ACCOUNT_STATUS_ALL) {
-    return; // Don't change the list if "All" statuses are selected.
+  if (!isset($_SESSION['versioncontrol_filter_repo_id'])) {
+    $_SESSION['versioncontrol_filter_repo_id'] = 0;
   }
+  $filter_repo_id = $_SESSION['versioncontrol_filter_repo_id'];
+
+  if ($filter_status == VERSIONCONTROL_ACCOUNT_STATUS_ALL
+  && $filter_repo_id == 0) {
+    return; // Don't change the list if "All" statuses are selected or no repo_id is choosen
+  }
+  if ($filter_repo_id != 0) {
+    versioncontrol_account_status_filter_repo_id($accounts, $filter_repo_id);
+  }
+  if ($filter_status != VERSIONCONTROL_ACCOUNT_STATUS_ALL) {
+    versioncontrol_account_status_filter_status($accounts, $filter_status);
+  }
+}
 
+/**
+ * Unset filtered accounts before they are even attempted to be displayed
+ * on the account list.
+ */
+function versioncontrol_account_status_filter_repo_id(&$accounts, $filter_repo_id) {
+  //FIXME new structure for the array
+  foreach ($accounts as $uid => $usernames_by_repository) {
+    foreach ($usernames_by_repository as $repo_id => $username) {
+      if ($repo_id != $filter_repo_id) {
+        unset($accounts[$uid][$repo_id]);
+        if (empty($accounts[$uid])) {
+          unset($accounts[$uid]);
+        }
+      }
+    }
+  }
+}
+/**
+ * Unset filtered accounts before they are even attempted to be displayed
+ * on the account list.
+ */
+function versioncontrol_account_status_filter_status(&$accounts, $filter_status) {
   $uid_constraints = array();
   $params = array($filter_status);
   foreach ($accounts as $uid => $usernames_by_repository) {
@@ -1301,3 +1333,431 @@ Motivation message:
 
   return $presets;
 }
+
+/**
+ * Implementation of hook_user():
+ */
+function versioncontrol_account_status_user($type, &$edit, &$user, $category = NULL) {
+  switch ($type) {
+    case 'delete':
+      // Delete VCS accounts when the associated user account is deleted.
+      db_query('DELETE FROM {versioncontrol_account_status_users} vcu
+        WHERE vcu.uid = %d', $user->uid);
+      break;
+
+  }
+}
+
+/**
+ * Implementation of hook_menu().
+ */
+function versioncontrol_account_status_menu() {
+  $items = array();
+  $items['admin/project/versioncontrol-accounts'] = array(
+    'title' => 'VCS accounts',
+    'description' => 'Manage associations of Drupal users to VCS user accounts.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('versioncontrol_admin_account_list_form'),
+    'access arguments' => array('administer version control systems'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+  $items['admin/project/versioncontrol-accounts/list'] = array(
+    'title' => 'List',
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+    'weight' => 0,
+  );
+  $items['versioncontrol/register'] = array(
+    'title' => 'Get commit access',
+    'page callback' => 'versioncontrol_account_status_register_page',
+    'access callback' => TRUE, // access checking is done in the page callback
+    'type' => MENU_SUGGESTED_ITEM,
+  );
+}
+
+/**
+ * Form callback for "versioncontrol/register[/$register_uid[/$register_at_repo_id]]":
+ * Provide an indirection that leads to an account registration form.
+ */
+function versioncontrol_account_status_register_page($register_uid = FALSE, $register_at_repo_id = FALSE) {
+  global $user;
+
+  if ($user->uid == 0 || !versioncontrol_user_access()) {
+    $presets = _versioncontrol_get_string_presets();
+
+    return variable_get(
+      'versioncontrol_registration_message_unauthorized',
+      $presets['versioncontrol_registration_message_unauthorized']
+    );
+  }
+
+  if ($register_uid == 'demo') {
+    $register_uid = VERSIONCONTROL_REGISTER_DEMO;
+  }
+  else {
+    $register_uid = is_numeric($register_uid) ? $register_uid : $user->uid;
+  }
+
+  $admin_access = versioncontrol_admin_access();
+
+  if (!$admin_access && $register_uid != $user->uid) {
+    drupal_access_denied();
+    return;
+  }
+
+  $accounts = versioncontrol_user_accounts_load($register_uid, TRUE);
+  $repositories = versioncontrol_repository_load_multiple(FALSE);
+
+  // Construct the '#options' array.
+  $account_usernames = array();
+  foreach ($accounts as $uid => $usernames_by_repository) {
+    foreach ($usernames_by_repository as $repo_id => $account) {
+      $account_usernames[$repo_id][] = $account->vcs_username;
+    }
+  }
+
+  if ($register_uid == VERSIONCONTROL_REGISTER_DEMO) {
+    $account_usernames = array();
+  }
+
+  $repository_names = array();
+  foreach ($repositories as $repo_id => $repository) {
+    if (isset($account_usernames[$repo_id])
+        && $repository->isAccountAuthorized($register_uid)) {
+      // We only want repositories in the list of repositories that are open
+      // for registrations where no (authorized) account exists yet.
+      continue;
+    }
+    if (!isset($first_repo_id)) {
+      $first_repo_id = $repo_id;
+    }
+    $repository_names[$repo_id] = check_plain($repository['name']);
+  }
+
+  // Filter (and possibly change the caption of) the list of repositories to
+  // select. The admin has all the permissions and gets the uncensored list.
+  if (!$admin_access) {
+    foreach (module_implements('versioncontrol_alter_repository_selection') as $module) {
+      $function = $module .'_versioncontrol_alter_repository_selection';
+      $function($repository_names, $repositories);
+    }
+  }
+
+  // If there's just one repository on the site, redirect directly to this one.
+  if (count($repository_names) == 1) {
+    $only_repo_id = $first_repo_id;
+  }
+  elseif (count($repositories) == 1) {
+    $only_repo_id = reset(array_keys($repositories));
+  }
+
+  if ($register_uid == VERSIONCONTROL_REGISTER_DEMO) {
+    unset($only_repo_id);
+  }
+
+  if (is_numeric($register_at_repo_id) || isset($only_repo_id)) {
+    // If there is only one repository left to register, it doesn't matter
+    // whether or not the URL contains a repository (and which one), we always
+    // redirect to the remaining possible one. Otherwise, we try to register
+    // at the given repository.
+    $repo_id = isset($only_repo_id) ? $only_repo_id : $register_at_repo_id;
+
+    if (isset($account_usernames[$repo_id])) {
+      drupal_set_message(t('You already have a registered account.'));
+      drupal_goto('user/'. $user->uid .'/edit/versioncontrol/'. $repo_id
+                  .'/'. reset($account_usernames[$repo_id]));
+      // drupal_goto() calls exit() so script execution ends right here
+    }
+    elseif (isset($repository_names[$repo_id])) {
+      return drupal_get_form('versioncontrol_account_edit_form',
+        $register_uid, $repositories[$repo_id], VERSIONCONTROL_FORM_CREATE
+      );
+    }
+  }
+
+  if (!isset($first_repo_id)) {
+    // when there are no repos, this var is not set
+    $first_repo_id = NULL;
+  }
+
+  return drupal_get_form('versioncontrol_account_register_form',
+    $register_uid, $repository_names, $first_repo_id
+  );
+}
+
+/**
+ * Form callback for "admin/project/versioncontrol-accounts":
+ * A list of accounts with filtering possibilities.
+ *
+ * TODO Completely reimplement in Views.
+ */
+function versioncontrol_admin_account_list_form(&$form_state) {
+  // Retrieve a list of all repositories with registered VCS accounts.
+  $result = db_query('SELECT DISTINCT repo_id FROM {versioncontrol_accounts}');
+  $repo_ids = array();
+
+  while ($repo_id = db_result($result)) {
+    $repo_ids[] = $repo_id;
+  }
+  $repositories = versioncontrol_repository_load_multiple($repo_ids);
+
+  $filter_form = versioncontrol_admin_account_list_filter_form($form_state, $repositories);
+  $filter_form['#id'] = 'versioncontrol-account-filter-form';
+  drupal_alter('form', $filter_form, $form_state, 'versioncontrol_admin_account_list_filter_form');
+
+  $form = array();
+  $form['filters'] = array_merge($filter_form, array(
+    '#type' => 'fieldset',
+    '#title' => t('Filter'),
+    '#collapsible' => TRUE,
+    '#collapsed' => FALSE,
+    '#prefix' => '<div class="container-inline">',
+    '#suffix' => '</div>',
+  ));
+
+  // Filter the list of accounts.
+  $accounts = versioncontrol_user_accounts_load_multiple(array(), array(), array('include unauthorized' => TRUE));
+
+  foreach (module_implements('versioncontrol_filter_accounts') as $module) {
+    $function = $module .'_versioncontrol_filter_accounts';
+    $function($accounts);
+  }
+  $accounts = versioncontrol_admin_get_paged_accounts($accounts);
+  $users = array();
+
+  // Retrieve more info for the accounts that survived filtering.
+  foreach ($accounts as $uid => $usernames_by_repository) {
+    $user = user_load($uid);
+    if (!$user) {
+      unset($accounts[$uid]);
+      continue;
+    }
+    $users[$uid] = $user;
+  }
+  if (empty($users)) {
+    $form['empty'] = array(
+      '#type' => 'markup',
+      '#value' => '<p>'. t('No accounts could be found with the current filter settings.') .'</p>',
+    );
+    return $form;
+  }
+
+  // Retrieve total, first and last commits of each user.
+  // FIXME getStatistics was removed on other commit, see if we need to
+  // resurrect it(probably re-architeching it)
+  $statistics = VersioncontrolOperationCache::getInstance()->getStatistics(array(
+    'types' => array(VERSIONCONTROL_OPERATION_COMMIT),
+    'uids' => array_keys($users),
+  ), array(
+    'group_by' => array('uid'),
+  ));
+
+  $total_operations = array();
+  $first_operation_dates = array();
+  $last_operation_dates = array();
+
+  foreach ($statistics as $user_stats) {
+    $total_operations[$user_stats->uid] = $user_stats->total_operations;
+    $first_operation_dates[$user_stats->uid] = t('!time ago', array(
+      '!time' => format_interval(time() - $user_stats->first_operation_date, 1))
+    );
+    $last_operation_dates[$user_stats->uid] = t('!time ago', array(
+      '!time' => format_interval(time() - $user_stats->last_operation_date, 1))
+    );
+    if (module_exists('commitlog')) {
+      $total_operations[$user_stats->uid] =
+        l($total_operations[$user_stats->uid], 'user/'. $user_stats->uid .'/track/code');
+    }
+  }
+
+  // Construct the user account table.
+  $header = array(t('User'), t('Accounts'), t('Commits'), t('First commit'), t('Last commit'));
+  $rows_by_uid = array();
+  foreach ($accounts as $uid => $usernames_by_repository) {
+    $user = $users[$uid];
+
+    // Present a list of all VCS usernames and the repository where they're in.
+    $repo_usernames = array();
+    foreach ($usernames_by_repository as $repo_id => $account) {
+      if (!isset($repositories[$repo_id])) { // happens if the backend isn't loaded
+        continue;
+      }
+      $formatted_username = theme('versioncontrol_account_username',
+        $uid, $account->vcs_username, $repositories[$repo_id],
+        array('prefer_drupal_username' => FALSE)
+      );
+      $repo_name = module_exists('commitlog')
+        ? theme('commitlog_repository', $repositories[$repo_id])
+        : check_plain($repositories[$repo_id]['name']);
+
+      $repo_usernames[] = t('!username in !repository (!edit)', array(
+        '!username' => $formatted_username,
+        '!repository' => $repo_name,
+        '!edit' => l(t('edit'),
+          'user/'. $uid .'/edit/versioncontrol/'. $repo_id .'/'. drupal_urlencode($account->vcs_username)
+        ),
+      ));
+    }
+    $vcs_usernames = empty($repo_usernames)
+      ? t('VCS backend is currently disabled')
+      : theme('item_list', $repo_usernames);
+
+    $rows_by_uid[$uid] = array(
+      theme('username', $user), $vcs_usernames,
+      isset($total_operations[$uid]) ? $total_operations[$uid] : 0,
+      isset($first_operation_dates[$uid]) ? $first_operation_dates[$uid] : t('n/a'),
+      isset($last_operation_dates[$uid]) ? $last_operation_dates[$uid] : t('n/a'),
+    );
+  }
+
+  // Provide a possibility for backends and other modules to modify the list.
+  foreach (module_implements('versioncontrol_alter_account_list') as $module) {
+    $function = $module .'_versioncontrol_alter_account_list';
+    $function($accounts, $repositories, $header, $rows_by_uid);
+  }
+  // We don't want the uids in the final $rows array.
+  $rows = array_values($rows_by_uid);
+
+  // The finished user account list with account filter.
+  $form['accounts'] = array(
+    '#type' => 'markup',
+    '#value' => theme('table', $header, $rows),
+  );
+
+  if ($pager = theme('pager', NULL, variable_get('versioncontrol_admin_account_pager', 20), 0)) {
+    $form['pager'] = array(
+      '#type' => 'markup',
+      '#value' => $pager,
+    );
+  }
+  return $form;
+}
+
+/**
+ * A form for filtering accounts which is embedded in the account list page.
+ */
+function versioncontrol_admin_account_list_filter_form(&$form_state, $repositories) {
+  $form = array();
+  $repository_names = array(0 => t('All'));
+
+  foreach ($repositories as $repo_id => $repository) {
+    $repository_names[$repo_id] = check_plain($repository['name']);
+  }
+  if (!isset($_SESSION['versioncontrol_filter_repo_id'])) {
+    $_SESSION['versioncontrol_filter_repo_id'] = 0;
+  }
+
+  $form['#id'] = 'versioncontrol-account-filter-form';
+
+  $form['repo_id'] = array(
+    '#type' => 'select',
+    '#title' => t('Repository'),
+    '#options' => $repository_names,
+    '#default_value' => $_SESSION['versioncontrol_filter_repo_id'],
+    '#weight' => 10,
+  );
+  $form['submit'] = array(
+    '#type' => 'submit',
+    '#value' => t('Filter'),
+    '#submit' => array('versioncontrol_admin_account_list_filter_form_submit'),
+    '#weight' => 100,
+  );
+  return $form;
+}
+
+/**
+ * Submit handler for the account filter form.
+ */
+function versioncontrol_admin_account_list_filter_form_submit($form, &$form_state) {
+  $_SESSION['versioncontrol_filter_repo_id'] = $form_state['values']['repo_id'];
+}
+
+/**
+ * Return a subset of the given accounts (10 Drupal users by default, and all
+ * of their VCS usernames). Paging is also used by emulating pager_query().
+ */
+function versioncontrol_admin_get_paged_accounts($accounts, $element = 0) {
+  global $pager_page_array, $pager_total, $pager_total_items;
+  $page = isset($_GET['page']) ? $_GET['page'] : '';
+  $pager_page_array = explode(',', $page);
+  $page = empty($pager_page_array[$element]) ? 0 : $pager_page_array[$element];
+
+  $limit = variable_get('versioncontrol_admin_account_pager', 20);
+  $i = 0;
+  $paged_accounts = array();
+
+  foreach ($accounts as $uid => $usernames_by_repository) {
+    if ($i >= ($page * $limit) && $i < (($page+1) * $limit)) {
+      $paged_accounts[$uid] = $usernames_by_repository;
+    }
+    ++$i;
+  }
+
+  // Emulate pager_query() in order to get a proper theme('pager').
+  $pager_total_items[$element] = count($accounts);
+  $pager_total[$element] = ceil($pager_total_items[$element] / $limit);
+  $pager_page_array[$element] = max(0, min((int)$pager_page_array[$element], ((int)$pager_total[$element]) - 1));
+
+  return $paged_accounts;
+}
+
+/**
+ * Add or update the user account when the edit/register form is submitted.
+ */
+function versioncontrol_account_edit_form_submit($form, &$form_state) {
+  // Reconstruct the user data from the $form_state that was passed.
+  $uid = $form['#uid'];
+  $vcs_username = $form_state['values']['account_name'];
+  $repository = $form['#repository'];
+  $vcs_name = $form['#vcs_name'];
+
+  // Let other modules provide additional account data.
+  $additional_data = array();
+  foreach (module_implements('versioncontrol_account_submit') as $module) {
+    $function = $module .'_versioncontrol_account_submit';
+    $function($additional_data, $form, $form_state);
+  }
+
+  if (empty($form['#original_username'])) {
+    $data = array(
+      'vcs_username' => $vcs_username,
+      'uid' => $uid,
+      'repository' => $repository,
+    );
+    $vcs_account = $repository->getBackend()->buildEntity('account', $data);
+    $vcs_account->additional_data = $additional_data;
+    $vcs_account->insert();
+    $message = drupal_set_message(t(
+      'The @vcs account %vcs_username has been registered.',
+      array('@vcs' => $vcs_name, '%vcs_username' => $vcs_username)
+    ));
+  }
+  else {
+    //FIXME why username are a required constraint? <-- shouldn't be anymore
+    //      uid and repo_id are the PK on the table getAccounts query
+    $conditions = array(
+      'repo_id' => array($repository->repo_id),
+      'vcs_username' => array($form['#original_username'])
+    );
+    $vcs_accounts = versioncontrol_user_accounts_load_multiple(array($uid), $conditions, array('include unauthorized' => TRUE));
+    // if we got an original_username we can trust on getting a value
+    $vcs_account = array_shift($vcs_accounts);
+
+    $vcs_account->vcs_username = $vcs_username;
+    $vcs_account->additional_data = $additional_data;
+    $vcs_account->update();
+
+    // Regular users cannot change the username, and will probably get
+    // a message for each of the other actions that hook into the form.
+    if (versioncontrol_admin_access()) {
+      $message = drupal_set_message(t(
+        'The @vcs account %username has been updated successfully.',
+        array('@vcs' => $vcs_name, '%username' => $vcs_username)
+      ));
+    }
+  }
+
+  $form_state['redirect'] = versioncontrol_admin_access()
+    ? 'admin/project/versioncontrol-accounts'
+    : 'user/'. $uid .'/edit/versioncontrol/'. $repository->repo_id
+        .'/'. drupal_urlencode($vcs_username);
+}
diff --git versioncontrol_fakevcs/includes/classes.inc versioncontrol_fakevcs/includes/classes.inc
index fc690d8..2b2a8d5 100644
--- versioncontrol_fakevcs/includes/classes.inc
+++ versioncontrol_fakevcs/includes/classes.inc
@@ -6,7 +6,6 @@ class VersioncontrolFakeBackend extends VersioncontrolBackend {
 
   public $classes = array(
     'repo'      => 'VersioncontrolFakeRepository',
-    'account'   => 'VersioncontrolFakeAccount',
     'operation' => 'VersioncontrolFakeOperation',
     'item'      => 'VersioncontrolFakeItem',
   );
@@ -78,65 +77,6 @@ class VersioncontrolFakeRepository extends VersioncontrolRepository implements V
 
 }
 
-class VersioncontrolFakeAccount extends VersioncontrolAccount {
-
-  /**
-   * Overwrite
-   */
-  public function usernameSuggestion($user) {
-    // For distributed version control systems, the user's email address
-    // might be a more appropriate username than the actual nick - it
-    // guarantees unique identification (= uid association for
-    // operations), even though it might need to be replaced by or
-    // amended with the full name on page display.
-    return $user->mail;
-  }
-
-  /**
-   * Overwrite
-   */
-  protected function _insert($additional_data) {
-    $fakevcs_specific = $additional_data['fakevcs_specific'];
-    if (!isset($fakevcs_specific) || !isset($fakevcs_specific['password'])) {
-      drupal_set_message(t('Error: no FakeVCS password given on account creation!'), 'error');
-      return;
-    }
-    db_query("INSERT INTO {versioncontrol_fakevcs_accounts}
-      (uid, repo_id, password)
-      VALUES (%d, %d, '%s')",
-      $this->uid, $this->repository->repo_id, $fakevcs_specific['password']);
-  }
-
-  /**
-   * Overwrite
-   */
-  protected function _update($additional_data) {
-    $fakevcs_specific = $additional_data['fakevcs_specific'];
-    if (!isset($fakevcs_specific) || !isset($fakevcs_specific['password'])) {
-      return; // the user didn't update the password in the process.
-    }
-    db_query("UPDATE {versioncontrol_fakevcs_accounts}
-      SET password = '%s'
-      WHERE uid = %d AND repo_id = %d",
-    $fakevcs_specific['password'], $this->uid, $this->repository->repo_id);
-
-    if (!versioncontrol_admin_access()) {
-      // Admins get "The account has been updated successfully" anyways.
-      drupal_set_message(t('The FakeVCS password has been updated successfully.'));
-    }
-  }
-
-  /**
-   * Overwrite
-   */
-  protected function _delete($additional_data) {
-   db_query('DELETE FROM {versioncontrol_fakevcs_accounts}
-     WHERE uid = %d AND repo_id = %d',
-     $this->uid, $this->repository->repo_id);
-  }
-
-}
-
 class VersioncontrolFakeOperation extends VersioncontrolOperation {
 
   /**
