diff --git a/commerce_checkout_login.module b/commerce_checkout_login.module
index 63754d7..a3f2c30 100644
--- a/commerce_checkout_login.module
+++ b/commerce_checkout_login.module
@@ -5,183 +5,65 @@
  * Adds an inline login form to the Account Information checkout pane.
  */
 
-
 /**
  * Implements hook_form_FORM_ID_alter().
- *
- * This module works by altering the checkout form to add an additional bit of
- * AJAX to the Account Information checkout pane via this hook.
  */
-function commerce_checkout_login_form_commerce_checkout_form_alter(&$form, &$form_state) {
-  global $user;
-
-  // If the Account Information pane is on the current checkout page and the
-  // user is not logged in...
-  if (!$user->uid && !empty($form['account'])) {
-    $form['account']['login']['mail'] += array(
-      '#ajax' => array(
-        'callback' => 'commerce_checkout_login_checkout_form_refresh',
-        'wrapper' => 'account-login-container',
-      ),
-    );
-
-    // Immediately validate e-mail addresses if mail confirmation is enabled.
-    if (isset($form['account']['login']['mail_confirm'])) {
-      $form['account']['login']['mail_confirm']['#ajax'] = array(
-        'callback' => 'commerce_checkout_login_checkout_form_refresh',
-        'wrapper' => 'account-login-container',
-      );
-    }
-
-    // Check the form state to see if an e-mail address has been specified.
-    if (!empty($form_state['values']['account']['login'])) {
-      $mail = trim($form_state['values']['account']['login']['mail']);
-
-      // Don't attempt to load the user for an invalid e-mail address.
-      if (_validate_email($mail) && user_load_by_mail($mail)) {
-        // An existing e-mail address has been entered. Add a password field to
-        // allow the customer to login.
-        // @todo: autosubmit by ajax, but only if password was changed to
-        // prevent infinite loops caused by automatically filled forms.
-        $form['account']['login']['password'] = array(
-          '#type' => 'password',
-          '#title' => t('Password'),
-          '#required' => TRUE,
-          '#description' => t('Please enter the password for your account. !forgot', array('!forgot' => l(t('Did you forget your password?'), 'user/password')))
-        );
-
-        // No e-mail confirmation is required to login. So we hide the e-mail
-        // confirmation field if it is set.
-        if (isset($form['account']['login']['mail_confirm'])) {
-          $form['account']['login']['mail_confirm']['#value'] = $mail;
-          $form['account']['login']['mail_confirm']['#access'] = FALSE;
-        }
-      }
-    }
+function commerce_checkout_login_form_commerce_checkout_form_account_alter(&$form, &$form_state, $form_id) {
+  // Set the name to guest to differentiate during validation.
+  $form['buttons']['continue']['#name'] = 'guest';
+  // Guest checkout does not need any validation.
+  $form['buttons']['continue']['#limit_validation_errors'] = array();
+  // Change the button label if the register/login form is shown.
+  if ($form_state['account']->uid === 0) {
+    $form['buttons']['continue']['#value'] = t('Checkout as guest');
   }
 }
 
 /**
- * Ajax callback: returns the account information pane to an AJAX request.
+ * Implements hook_commerce_checkout_pane_info().
  */
-function commerce_checkout_login_checkout_form_refresh($form, $form_state) {
-  $show_conf_mail = variable_get('commerce_order_account_pane_mail_double_entry', FALSE);
-
-  $mail = !empty($form_state['values']['account']['login']['mail']) ? trim($form_state['values']['account']['login']['mail']) : '';
-  _validate_email($mail);
-
-  // Just return the new login form if e-mail confirmation is not required.
-  if (!$show_conf_mail) {
-    return $form['account']['login'];
-  }
+function commerce_checkout_login_commerce_checkout_pane_info() {
+  global $user;
 
-  // Return AJAX commands to set focus to the mail confirmation field for
-  // improved user experience.
-  $commands = array();
-  $commands[] = ajax_command_replace('#' . $form['account']['login']['mail']['#ajax']['wrapper'], drupal_render($form['account']['login']));
-  $commands[] = ajax_command_invoke('[name="account[login][mail_confirm]"]', 'focus');
-  print ajax_render($commands);
-  exit;
+  $panes['account_form'] = array(
+    'title' => $user->uid > 0 ? t('Account information') : t('Checkout method'),
+    'name' => t('Account'),
+    'page' => 'account',
+    'file' => 'commerce_checkout_login.panes.inc',
+    'callbacks' => array(
+      'checkout_form' => 'commerce_checkout_login_account_form',
+      'checkout_form_validate' => 'commerce_checkout_login_account_form_validate',
+      'checkout_form_submit' => 'commerce_checkout_login_account_form_submit',
+    ),
+  );
+
+  return $panes;
 }
 
 /**
- * Implements hook_commerce_checkout_pane_info_alter().
+ * Implements hook_commerce_checkout_page_info().
  */
-function commerce_checkout_login_commerce_checkout_pane_info_alter(&$checkout_panes) {
-  if (isset($checkout_panes['account'])) {
-    $checkout_panes['account']['callbacks']['checkout_form_validate'] = 'commerce_checkout_login_commerce_checkout_pane_validate';
-    $checkout_panes['account']['callbacks']['checkout_form_submit'] = 'commerce_checkout_login_commerce_checkout_pane_submit';
-  }
-}
+function commerce_checkout_login_commerce_checkout_page_info() {
+  $pages['account'] = array(
+    'title' => t('Account'),
+    'weight' => -1,
+  );
 
+  return $pages;
+}
 
 /**
  * Account checkout pane validation.
  */
 function commerce_checkout_login_commerce_checkout_pane_validate(&$form, &$form_state, $checkout_pane, $order) {
-  $mail = !empty($form_state['values']['account']['login']['mail']) ? trim($form_state['values']['account']['login']['mail']) : $form_state['order']->mail;
-
-  // Bail if the e-mail address is invalid.
-  if (!_validate_email($mail)) {
-    return FALSE;
-  }
-
-  if ($account = user_load_by_mail($mail)) {
-    $validated = _validate_existing_account($form, $form_state, $account);
-  }
-  // A non-existing e-mail address has been entered.
-  else {
-    $validated = TRUE;
-    // Validate e-mail confirmation field if set.
-    if (isset($form['account']['login']['mail_confirm'])) {
-      $mail_confirm = !empty($form_state['values']['account']['login']['mail_confirm']) ? trim($form_state['values']['account']['login']['mail_confirm']) : '';
-      if (empty($mail_confirm) || $mail != $mail_confirm) {
-        form_set_error('account][login][mail_confirm', t('The specified e-mail addresses do not match.'));
-        $validated = FALSE;
-      }
-    }
-
-    if (isset($form['account']['login']['password'])) {
-      // A password field is present. During rebuild of the form, this password
-      // field will be removed because a non-existing email address was entered.
-      // Previous form validation might already have set a password required
-      // message. We need to remove said message.
-      $messages = drupal_get_messages('error');
-      $password_title = $form['account']['login']['password']['#title'];
-      foreach ($messages['error'] as $message) {
-        if ($message != strip_tags(t('The field %field is required.', array('%field' => $password_title)))) {
-          // This message is not the password required message, re-set it.
-          drupal_set_message($message, 'error');
-        }
-      }
-    }
-  }
-
-  return $validated;
-}
-
-/**
- * Account checkout pane submit handler.
- */
-function commerce_checkout_login_commerce_checkout_pane_submit(&$form, &$form_state, $checkout_pane, $order) {
-  global $user;
-
-  // commerce_checkout_login_uid gets set during _validate_existing_account() if
-  // the account was validated successfully.
-  if (!empty($form_state['commerce_checkout_login_uid'])) {
-    // If the user was logged in during this request, make sure we are using the
-    // full user object.
-    if (!empty($user->uid)) {
-      $user = user_load($user->uid);
-    }
-    else {
-      // Load the validated user into the global $user variable.
-      $user = user_load($form_state['commerce_checkout_login_uid']);
-
-      // "Finalize" the login by triggering the appropriate system messages, IP
-      // address and login timestamp logging, and user login hook.
-      user_login_finalize();
-    }
-
-    // Convert the current order from anonymous to authenticated and clear out
-    // our variable from the form state.
-    $oid = is_object($form_state['order']) ? $form_state['order']->order_id : $form_state['order'];
-    $order = commerce_order_load($oid);
-    if (empty($order->uid)) {
-      commerce_checkout_login_order_convert($order, $user);
-    }
-    unset($form_state['commerce_checkout_login_uid']);
-  }
-}
-
-/**
- * Email validation helper
- */
-function _validate_email($mail) {
+  // By default checkout does not validate the e-mail address.
+  $mail = trim($form_state['values']['account']['login']['mail']);
   if ($error = user_validate_mail($mail)) {
     form_set_error('account][login][mail', $error);
     return FALSE;
   }
+  // todo change the form to prevent email address entry.
+  // fixme Check if email address exists and redirect user to the login pane if it does.
   return TRUE;
 }
 
@@ -196,68 +78,57 @@ function _validate_existing_account(&$form, &$form_state, &$account) {
     }
   }
 
-  // If there is no password field present, the customer has not yet been
-  // informed about the the pre-existing account. We therefore have to inform
-  // the customer about this.
-  if (!isset($form['account']['login']['password'])) {
-    $message = t('There is already an account registered to %mail. Please enter your password to continue checkout.', array('%mail' => $account->mail));
-    drupal_set_message($message, 'warning');
-    // By invalidating the form submission we trigger a rebuild which will cause
-    // the password field to be rendered.
-    return FALSE;
+  // user_login_authenticate_validate() does a flood controlled authentication
+  // of the credentials based on a form submission. We therefor simulate a form
+  // submission to make use of existing code.
+  $credentials['values'] = array(
+    'pass' => $form_state['values']['account_form']['select']['login']['password'],
+    'name' => $account->name,
+  );
+  user_login_authenticate_validate(array(), $credentials);
+  // The uid is added to the credentials when validation is successful.
+  if (isset($credentials['uid']) && $credentials['uid']) {
+    // Clear past failures for this user so as not to block a user who might
+    // log in and out more than once in an hour.
+    if (isset($credentials['flood_control_user_identifier'])) {
+      flood_clear_event('failed_login_attempt_user', $credentials['flood_control_user_identifier']);
+    }
+    $form_state['commerce_checkout_login_uid'] = $credentials['uid'];
+    return TRUE;
   }
   else {
-    // Display an appropriate error message if the user account is blocked.
-    if (user_is_blocked($account->name)) {
-      form_set_error('account][login][email', t('The username %name has not been activated or is blocked.', array('%name' => $account->name)));
-      return FALSE;
-    }
-
-    // user_login_authenticate_validate() does a flood controlled authentication
-    // of the credentials based on a form submission. We therefor simulate a
-    // form submission to make use of existing code.
-    $credentials['values'] = array(
-      'pass' => $form_state['values']['account']['login']['password'],
-      'name' => $account->name,
-    );
-    user_login_authenticate_validate(array(), $credentials);
-    // The uid is added to the credentials when validation is successful.
-    if (isset($credentials['uid']) && $credentials['uid']) {
-      // Clear past failures for this user so as not to block a user who might
-      // log in and out more than once in an hour.
-      if (isset($credentials['flood_control_user_identifier'])) {
-        flood_clear_event('failed_login_attempt_user', $credentials['flood_control_user_identifier']);
-      }
-      $form_state['commerce_checkout_login_uid'] = $credentials['uid'];
-      return TRUE;
+    // Register events for flood control.
+    // Copied/adjusted from user_login_final_validate().
+
+    // Always register an IP-based failed login event.
+    flood_register_event('failed_login_attempt_ip', variable_get('user_failed_login_ip_window', 3600));
+    // Register a per-user failed login event.
+    if (isset($credentials['flood_control_user_identifier'])) {
+      flood_register_event('failed_login_attempt_user', variable_get('user_failed_login_user_window', 21600), $credentials['flood_control_user_identifier']);
     }
-    else {
-      // Register events for flood control.
-      // Copied/adjusted from user_login_final_validate().
-
-      // Always register an IP-based failed login event.
-      flood_register_event('failed_login_attempt_ip', variable_get('user_failed_login_ip_window', 3600));
-      // Register a per-user failed login event.
-      if (isset($credentials['flood_control_user_identifier'])) {
-        flood_register_event('failed_login_attempt_user', variable_get('user_failed_login_user_window', 21600), $credentials['flood_control_user_identifier']);
-      }
 
-      if (isset($credentials['flood_control_triggered'])) {
-        if ($credentials['flood_control_triggered'] == 'user') {
-          form_set_error('account][login][name', format_plural(variable_get('user_failed_login_user_limit', 5), 'Sorry, there has been more than one failed login attempt for this account. It is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', 'Sorry, there have been more than @count failed login attempts for this account. It is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', array('@url' => url('user/password'))));
-        }
-        else {
-          // We did not find a uid, so the limit is IP-based.
-          form_set_error('account][login][name', t('Sorry, too many failed login attempts from your IP address. This IP address is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', array('@url' => url('user/password'))));
-        }
+    if (isset($credentials['flood_control_triggered'])) {
+      if ($credentials['flood_control_triggered'] == 'user') {
+        form_set_error('account_form][select][login][name', format_plural(variable_get('user_failed_login_user_limit', 5), 'Sorry, there has been more than one failed login attempt for this account. It is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', 'Sorry, there have been more than @count failed login attempts for this account. It is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', array('@url' => url('user/password'))));
       }
       else {
-        form_set_error('account][login][name', t('Sorry, unrecognized username or password. <a href="@password">Have you forgotten your password?</a>', array('@password' => url('user/password', array('query' => array('name' => $credentials['values']['name']))))));
-        watchdog('commerce_checkout_login', 'Login attempt failed for %user.', array('%user' => $credentials['values']['name']));
-        return FALSE;
+        // We did not find a uid, so the limit is IP-based.
+        form_set_error('account_form][select][login][name', t('Sorry, too many failed login attempts from your IP address. This IP address is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', array('@url' => url('user/password'))));
       }
     }
+    else {
+      form_set_error('account_form][select][login][name', t('Sorry, unrecognized username or password. <a href="@password">Have you forgotten your password?</a>', array('@password' => url('user/password', array('query' => array('name' => $credentials['values']['name']))))));
+      watchdog('commerce_checkout_login', 'Login attempt failed for %user.', array('%user' => $credentials['values']['name']));
+    }
+  }
+  
+  // Display an appropriate error message if the user account is blocked.
+  if (user_is_blocked($account->name)) {
+    form_set_error('account_form][select][login][email', t('The username %name has not been activated or is blocked.', array('%name' => $account->name)));
+    return FALSE;
   }
+  
+  return FALSE;
 }
 
 /**
diff --git a/commerce_checkout_login.panes.inc b/commerce_checkout_login.panes.inc
new file mode 100644
index 0000000..a15f4d9
--- /dev/null
+++ b/commerce_checkout_login.panes.inc
@@ -0,0 +1,199 @@
+<?php
+
+/**
+ * @file Contains all callbacks for Commerce checkout login's checkout panes.
+ */
+
+/**
+ * Account pane form callback.
+ */
+function commerce_checkout_login_account_form($form, &$form_state, $checkout_pane, $order) {
+  if ($form_state['account']->uid > 0) {
+    // The user is logged in, display account information.
+    module_load_include('inc', 'commerce_order', 'includes/commerce_order.checkout_pane');
+    $form['account_info']['#markup'] = commerce_order_account_pane_review($form, $form_state, $checkout_pane, $order);
+  }
+  else {
+    drupal_add_css(drupal_get_path('module', 'commerce_checkout_login') . '/css/commerce_checkout_login.admin.css');
+
+    // @todo make this text configurable.
+    $form['help'] = array(
+      '#type' => 'item',
+      '#markup' => t('You can create an account by filling the form and clicking the %register button or checkout without registering by clicking the %guest button below.', array('%register' => t('Register and checkout'), '%guest' => t('Checkout as guest'))),
+    );
+
+    $form['select']['#type'] = 'container';
+
+    $form['select']['login'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('Login'),
+    );
+
+    $form['select']['login']['mail'] = array(
+      '#type' => 'textfield',
+      '#title' => t('E-mail address'),
+      '#size' => 25,
+      '#required' => TRUE,
+    );
+
+    $form['select']['login']['password'] = array(
+      '#type' => 'password',
+      '#title' => t('Password'),
+      '#size' => 25,
+      '#required' => TRUE,
+    );
+
+    $form['select']['login']['continue'] = array(
+      '#type' => 'submit',
+      '#name' => 'login',
+      '#value' => t('Login & checkout'),
+      '#validate' => array('commerce_checkout_form_validate'),
+      '#limit_validation_errors' => array(array('account_form', 'select', 'login')),
+      '#submit' => array('commerce_checkout_form_submit'),
+    );
+
+    // todo follow account creation permission.
+    $form['select']['register'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('Register account'),
+    );
+
+    $form['select']['register']['username'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Username'),
+      '#size' => 25,
+      '#required' => TRUE,
+      '#default_value' => isset($defaults['username']) ? $defaults['username'] : '',
+      '#maxlength' => USERNAME_MAX_LENGTH,
+      '#description' => t('Spaces are allowed; punctuation is not allowed except for periods, hyphens, apostrophes, and underscores.'),
+    );
+
+    $form['select']['register']['mail'] = array(
+      '#type' => 'textfield',
+      '#title' => t('E-mail address'),
+      '#size' => 25,
+      '#description' => t('A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'),
+      '#required' => TRUE,
+    );
+    // @todo email confirm field or something.
+
+    // @todo load additional fields.
+    $form['select']['register']['continue'] = array(
+      '#type' => 'submit',
+      '#name' => 'register',
+      '#value' => t('Register & checkout'),
+      '#validate' => array('commerce_checkout_form_validate'),
+      '#limit_validation_errors' => array(array('account_form', 'select', 'register')),
+      '#submit' => array('commerce_checkout_form_submit'),
+    );
+
+  }
+
+  return $form;
+}
+
+/**
+ * Account pane validation handler.
+ */
+function commerce_checkout_login_account_form_validate($form, &$form_state, $checkout_pane, $order) {
+  switch ($form_state['triggering_element']['#name']) {
+    case 'login':
+      // The login form was submitted.
+      $mail = trim($form_state['values']['account_form']['select']['login']['mail']);
+      if ($error = user_validate_mail($mail)) {
+        form_set_error('account_form][select][login][mail', $error);
+      }
+      else {
+        $account = user_load_by_mail($mail);
+        // A user can be loaded using the supplied email address. validate it.
+        return _validate_existing_account($form, $form_state, $account);
+      }
+      break;
+    
+    case 'register':
+      // The register form was submitted.
+      $mail = trim($form_state['values']['account_form']['select']['register']['mail']);
+      if ($error = user_validate_mail($mail)) {
+        form_set_error('account_form][select][register][mail', $error);
+      }
+      elseif ($account = user_load_by_mail($mail)) {
+        form_set_error('account_form][select][register][mail', '');
+      }
+
+      $username = $form_state['values']['account_form']['select']['register']['username'];
+      // Validate username.
+      if ($error = user_validate_name($username)) {
+        form_set_error('account_form][select][register][username', $error);
+        return FALSE;
+      }
+      // Make sure the name is not already taken.
+      elseif ((bool) db_select('users')->fields('users', array('uid'))->condition('name', db_like($username), 'LIKE')->range(0, 1)->execute()->fetchField()) {
+        form_set_error('account_form][select][register][username', t('The name %name is already taken.', array('%name' => $username)));
+        return FALSE;
+      }
+      else {
+        // Create account and login.
+        $account = commerce_checkout_create_account($username, $mail, user_password(), TRUE, TRUE);
+        _user_mail_notify('register_no_approval_required', $account);
+        drupal_set_message(t('A welcome message with further instructions has been sent to your e-mail address.'));
+        // @todo save form data for later use. Use $order->data for this.
+        // set the uid to enable automatic login on submit.
+        $form_state['commerce_checkout_login_uid'] = $account->uid;
+        return TRUE;
+      }
+      break;
+
+    case 'guest':
+      // Guest checkout does not need any validation.
+      return TRUE;
+  }
+
+  return FALSE;
+}
+
+/**
+ * Account pane submit handler.
+ */
+function commerce_checkout_login_account_form_submit($form, &$form_state, $checkout_pane, $order) {
+  global $user;
+  $order->data['test'] = 'test';
+  // commerce_checkout_login_uid gets set during _validate_existing_account() if
+  // the account was validated successfully.
+  if (!empty($form_state['commerce_checkout_login_uid'])) {
+    // If the user was logged in during this request, make sure we are using the
+    // full user object.
+    if (!empty($user->uid)) {
+      $user = user_load($user->uid);
+    }
+    else {
+      // Load the validated user into the global $user variable.
+      $user = user_load($form_state['commerce_checkout_login_uid']);
+
+      // "Finalize" the login by triggering the appropriate system messages, IP
+      // address and login timestamp logging, and user login hook.
+      user_login_finalize();
+    }
+
+    // Convert the current order from anonymous to authenticated and clear out
+    // our variable from the form state.
+    if (empty($order->uid)) {
+      commerce_checkout_login_order_convert($order, $user);
+    }
+    unset($form_state['commerce_checkout_login_uid']);
+  }
+}
+
+function ccl_fetch_mail($form_state) {
+  // First validate the email field because it might have been changed.
+  if (isset($form_state['values']['account_form']['select']['login']['mail'])) {
+    $mail = trim($form_state['values']['account_form']['select']['login']['mail']);
+  }
+  elseif (isset($form_state['values']['account_form']['select']['register']['mail'])) {
+    $mail = trim($form_state['values']['account_form']['select']['register']['mail']);
+  }
+  else{
+    $mail = '';
+  }
+
+  return $mail;
+}
diff --git a/css/commerce_checkout_login.admin.css b/css/commerce_checkout_login.admin.css
new file mode 100644
index 0000000..be36c78
--- /dev/null
+++ b/css/commerce_checkout_login.admin.css
@@ -0,0 +1,8 @@
+#edit-account-form-select{
+  display: flex;
+  justify-content: space-between;
+}
+
+#edit-account-form-select > .form-wrapper {
+  flex:0 0 49%;
+}
\ No newline at end of file
