diff --git a/commerce_amazon_lpa.module b/commerce_amazon_lpa.module
index 6e91c29..43a45a8 100644
--- a/commerce_amazon_lpa.module
+++ b/commerce_amazon_lpa.module
@@ -522,6 +522,7 @@ function commerce_amazon_lpa_login_callback_access() {
  * Logs an authenticated Amazon user in and registers authmap.
  */
 function commerce_amazon_lpa_external_login() {
+  global $user;
   $api = new AmazonLPA();
 
   try {
@@ -531,14 +532,25 @@ function commerce_amazon_lpa_external_login() {
     $existing = user_load_by_mail($api_user['email']);
     if ($existing && !user_external_load($api_user['email'])) {
       // Add authmap.
-      user_set_authmaps($existing, array("authname_commerce_amazon_lpa" => $api_user['email']));
+      user_set_authmaps($existing, array('authname_commerce_amazon_lpa' => $api_user['email']));
+      watchdog('commerce_amazon_lpa', 'Auth map added for %name.', array('%name' => $existing->name));
       // Log user in.
       $form_state['uid'] = $existing->uid;
       user_login_submit(array(), $form_state);
     }
     else {
+      // Users created with Amazon Login seem to have their cart lost when the
+      // session is regenerated. So we grab it and convert it manually later.
+      $order = commerce_cart_order_load();
+
       // Register or log the user in.
       user_external_login_register($api_user['email'], 'commerce_amazon_lpa');
+      watchdog('commerce_amazon_lpa', 'User %name registered via Amazon login.', array('%name' => $user->name));
+
+      if (!empty($order)) {
+        commerce_cart_order_convert($order, $user);
+        watchdog('commerce_amazon_lpa', 'Converted cart @order_id for %name.', array('@order_id' => $order->order_id, '%name' => $user->name));
+      }
     }
   }
   catch (Exception $e) {
