diff --git a/classes/log/store.php b/classes/log/store.php
index 21014d0c3efbc248be362e08b42d610bb63dfb02..fea0d589862a880c524d6467d3d5f614185759fe 100755
--- a/classes/log/store.php
+++ b/classes/log/store.php
@@ -97,6 +97,7 @@ class store extends php_obj implements log_writer {
                 'source_lang' => 'en',
                 'send_mbox' => $this->get_config('mbox', false),
                 'send_short_course_id' => $this->get_config('shortcourseid', false),
+                'send_username' => $this->get_config('username', false),
                 'plugin_url' => 'https://github.com/xAPI-vle/moodle-logstore_xapi',
                 'plugin_version' => $plugin->release,
                 'repo' => new \src\transformer\repos\MoodleRepository($DB),
diff --git a/docs/configure-the-plugin.md b/docs/configure-the-plugin.md
index a62990d68274c9e2b239421d417db94a1b965c9c..62421a77cc02ab0f2f2f9d4584b96c055289a66c 100644
--- a/docs/configure-the-plugin.md
+++ b/docs/configure-the-plugin.md
@@ -1,5 +1,7 @@
 # Configure the plugin
 
+**Note that by default the plugin now runs in background mode via a cron task to avoid blocking page responses. This can be changed on the configuration page.**
+
 1. Set your “endpoint” to your LRS endpoint (e.g. “<http://your.lrs/xAPI>”).
 1. Set your “username” to your LRS basic auth key/username (e.g. “d416e6220812740d3922eb09813ebb4163e8eb3e”).
 1. Set your “password” to your LRS basic auth secret/password (e.g. “bc7e0a2edd5d1969b6d774e679d4eb4e7a35be13”).
diff --git a/lang/en/logstore_xapi.php b/lang/en/logstore_xapi.php
index fbe0e054a3a6b5162e04bf2809160ad9953f2296..66ca3dc5fe5d20940c887d21dbe033d9b2075c95 100644
--- a/lang/en/logstore_xapi.php
+++ b/lang/en/logstore_xapi.php
@@ -28,7 +28,7 @@ $string['username'] = 'Username';
 $string['xapisettingstitle'] = 'Logstore xAPI Settings';
 $string['backgroundmode'] = 'Send statements by scheduled task?';
 $string['backgroundmode_desc'] = 'This will force Moodle to send the statements to the LRS in the background,
-        via a cron task. This will make the process less close to real time, but will help to prevent unpredictable
+        via a cron task to avoid blocking page responses. This will make the process less close to real time, but will help to prevent unpredictable
         Moodle performance linked to the performance of the LRS.';
 $string['maxbatchsize'] = 'Maximum batch size';
 $string['maxbatchsize_desc'] = 'Statements are sent to the LRS in batches. This setting controls the maximum number of
@@ -39,7 +39,9 @@ $string['routes'] = 'Include actions with these routes';
 $string['filters'] = 'Filter logs';
 $string['logguests'] = 'Log guest actions';
 $string['filters_help'] = 'Enable filters that INCLUDE some actions to be logged.';
-$string['mbox'] = 'Send user email';
-$string['mbox_desc'] = 'Statements identify the user with its email (mbox) or with its userid on the moodle platform (account). Checking this will send the email (mbox).';
+$string['mbox'] = 'Identify users by email';
+$string['mbox_desc'] = 'Statements will identify users with their email (mbox) when this box is ticked.';
+$string['username'] = 'Identify users by id';
+$string['username_desc'] = 'Statements will identify users with their username when this box is ticked, but only if identifying users by email is disabled.';
 $string['shortcourseid'] = 'Send short course name';
-$string['shortcourseid_desc'] = 'Statements will contain the shortname for a course as a short course id extension';
\ No newline at end of file
+$string['shortcourseid_desc'] = 'Statements will contain the shortname for a course as a short course id extension';
diff --git a/settings.php b/settings.php
index b0a13cde108067473319859ae49427bf396cbd33..b1f79ff4300a194d1ddefb8f66d51be32df6e94f 100644
--- a/settings.php
+++ b/settings.php
@@ -33,7 +33,7 @@ if ($hassiteconfig) {
     // Switch background batch mode on.
     $settings->add(new admin_setting_configcheckbox('logstore_xapi/backgroundmode',
         get_string('backgroundmode', 'logstore_xapi'),
-        get_string('backgroundmode_desc', 'logstore_xapi'), 0));
+        get_string('backgroundmode_desc', 'logstore_xapi'), 1));
 
     $settings->add(new admin_setting_configtext('logstore_xapi/maxbatchsize',
         get_string('maxbatchsize', 'logstore_xapi'),
@@ -47,6 +47,10 @@ if ($hassiteconfig) {
         get_string('shortcourseid', 'logstore_xapi'),
         get_string('shortcourseid_desc', 'logstore_xapi'), 0));
 
+    $settings->add(new admin_setting_configcheckbox('logstore_xapi/username',
+        get_string('username', 'logstore_xapi'),
+        get_string('username_desc', 'logstore_xapi'), 0));
+
     // Filters.
     $settings->add(new admin_setting_heading('filters',
         get_string('filters', 'logstore_xapi'),
diff --git a/src/transformer/utils/get_activity/site.php b/src/transformer/utils/get_activity/site.php
index a5f57de8d05fb49d5ccd1ff3fdc5f81d67f8ef9e..01893c0276db28178d39f718e531ceccb0f70517 100644
--- a/src/transformer/utils/get_activity/site.php
+++ b/src/transformer/utils/get_activity/site.php
@@ -28,7 +28,7 @@ function site(array $config) {
     return [
         'id' => $config['app_url'],
         'definition' => [
-            'type' => 'http://id.tincanapi.com/activitytype/site',
+            'type' => 'http://id.tincanapi.com/activitytype/lms',
             'name' => [
                 $sitelang => $sitename,
             ],
diff --git a/src/transformer/utils/get_user.php b/src/transformer/utils/get_user.php
index fa4d7aadde89225b2a1f13ba1c413592f196787e..ac8aea9893a5595e30192c2a9e19a5f77c774e54 100644
--- a/src/transformer/utils/get_user.php
+++ b/src/transformer/utils/get_user.php
@@ -19,18 +19,29 @@ defined('MOODLE_INTERNAL') || die();
 
 function get_user(array $config, \stdClass $user) {
     $fullname = get_full_name($user);
-    if (array_key_exists('sendmbox', $config) && $config['sendmbox'] == true) {
+
+    if (array_key_exists('send_mbox', $config) && $config['send_mbox'] == true) {
         return [
             'name' => $fullname,
             'mbox' => $user->email,
         ];
-    } else {
+    }
+
+    if (array_key_exists('send_username', $config) && $config['send_username'] === true) {
         return [
             'name' => $fullname,
             'account' => [
                 'homePage' => $config['app_url'],
-                'name' => strval($user->id),
+                'name' => $user->username,
             ],
         ];
     }
+
+    return [
+        'name' => $fullname,
+        'account' => [
+            'homePage' => $config['app_url'],
+            'name' => strval($user->id),
+        ],
+    ];
 }
diff --git a/tests/all/course_module_viewed/viewing_scorm_module/statements.json b/tests/all/course_module_viewed/viewing_scorm_module/statements.json
index ce2998ac31af9661cf3805bb427841e2a22ee93d..8f7c6c9af0350c79babf5aa7f84da108bd98376b 100644
--- a/tests/all/course_module_viewed/viewing_scorm_module/statements.json
+++ b/tests/all/course_module_viewed/viewing_scorm_module/statements.json
@@ -39,7 +39,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/core/course_completed/completing_existing_course/statements.json b/tests/core/course_completed/completing_existing_course/statements.json
index ef18028c07366d8854135ae82d0676551a632640..1cb5315ab040a941ea7ca57ff68b68cf917757e7 100644
--- a/tests/core/course_completed/completing_existing_course/statements.json
+++ b/tests/core/course_completed/completing_existing_course/statements.json
@@ -39,7 +39,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/core/course_viewed/viewing_existing_course/statements.json b/tests/core/course_viewed/viewing_existing_course/statements.json
index e82866c2fa4074f0cc1a486463b07ad1aef35128..902e594c33fe77be4fd6685a7764f4ea9ca5e6df 100644
--- a/tests/core/course_viewed/viewing_existing_course/statements.json
+++ b/tests/core/course_viewed/viewing_existing_course/statements.json
@@ -39,7 +39,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/core/user_created/existing_user_created/statements.json b/tests/core/user_created/existing_user_created/statements.json
index 95461c562ae1e67fd0ea72bf2831a5b96729e3eb..f11e083d26ce047236da7db368acbd0ddee0e204 100644
--- a/tests/core/user_created/existing_user_created/statements.json
+++ b/tests/core/user_created/existing_user_created/statements.json
@@ -16,7 +16,7 @@
         "object": {
             "id": "http:\/\/www.example.org",
             "definition": {
-                "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                 "name": {
                     "en": "test_name"
                 }
diff --git a/tests/core/user_enrolment_created/existing_user_enrolled/statements.json b/tests/core/user_enrolment_created/existing_user_enrolled/statements.json
index ff38d1a1f8a8acd1c3907ea6f6eb6d3e2a6d2f94..c45bc30e2157285db9179bf0c7ef94b570aff889 100644
--- a/tests/core/user_enrolment_created/existing_user_enrolled/statements.json
+++ b/tests/core/user_enrolment_created/existing_user_enrolled/statements.json
@@ -39,7 +39,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/core/user_loggedin/existing_user_loggedin/statements.json b/tests/core/user_loggedin/existing_user_loggedin/statements.json
index 84aa4b398760427fd1f462f84e9a3b0525176477..961147ea7bfe2a0d12bcccf97be23c0da4706d5e 100644
--- a/tests/core/user_loggedin/existing_user_loggedin/statements.json
+++ b/tests/core/user_loggedin/existing_user_loggedin/statements.json
@@ -16,7 +16,7 @@
         "object": {
             "id": "http:\/\/www.example.org",
             "definition": {
-                "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                 "name": {
                     "en": "test_name"
                 }
diff --git a/tests/core/user_loggedout/existing_user_loggedout/statements.json b/tests/core/user_loggedout/existing_user_loggedout/statements.json
index 3382e9562c7dcc41ed804e349cd2ae0f6bf2b404..2b8b4c0a90ee52d156d2a835e97ca8ca7436e72c 100644
--- a/tests/core/user_loggedout/existing_user_loggedout/statements.json
+++ b/tests/core/user_loggedout/existing_user_loggedout/statements.json
@@ -16,7 +16,7 @@
         "object": {
             "id": "http:\/\/www.example.org",
             "definition": {
-                "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                 "name": {
                     "en": "test_name"
                 }
diff --git a/tests/mod_assign/assignment_graded/existing_assignment_graded/statements.json b/tests/mod_assign/assignment_graded/existing_assignment_graded/statements.json
index 96a709201169c4668064dab84c6aa307749ff84f..a1c609f4f4e867f805bd14fd66899a9497129e46 100644
--- a/tests/mod_assign/assignment_graded/existing_assignment_graded/statements.json
+++ b/tests/mod_assign/assignment_graded/existing_assignment_graded/statements.json
@@ -67,7 +67,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/statements.json b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/statements.json
index fbb8159d738d136b7a3a14f84ead923770ed62de..b07cb6ce4de5737a679764f0159073453da061a2 100644
--- a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/statements.json
+++ b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/statements.json
@@ -39,7 +39,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/statements.json b/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/statements.json
index d1eefb503161651863bf2e9f4f75c766e5eef6f2..e88ee7b81055aca69a8afd866055eae81ebe77de 100644
--- a/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/statements.json
+++ b/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/statements.json
@@ -39,7 +39,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/mod_facetoface/signup_success/existing_signup_success/statements.json b/tests/mod_facetoface/signup_success/existing_signup_success/statements.json
index b163759a031a05f875006e32f7f1fb83a1c51e32..ff16f45af802fc9753421d8d4876645204eac036 100644
--- a/tests/mod_facetoface/signup_success/existing_signup_success/statements.json
+++ b/tests/mod_facetoface/signup_success/existing_signup_success/statements.json
@@ -39,7 +39,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/mod_facetoface/take_attendance/existing_attendance_taken/statements.json b/tests/mod_facetoface/take_attendance/existing_attendance_taken/statements.json
index feb0a93357f4736b42d5008253db2a76d6de4d67..9e36627c43d35d0a2d117a4012a839b7698bca50 100644
--- a/tests/mod_facetoface/take_attendance/existing_attendance_taken/statements.json
+++ b/tests/mod_facetoface/take_attendance/existing_attendance_taken/statements.json
@@ -50,7 +50,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/mod_feedback/response_submitted/existing_response/statements.json b/tests/mod_feedback/response_submitted/existing_response/statements.json
index 06329a66280360e5f0522b5789bce6de21b2ef44..5e61d058dfa1197e46eaac16654567b403f4d2e1 100644
--- a/tests/mod_feedback/response_submitted/existing_response/statements.json
+++ b/tests/mod_feedback/response_submitted/existing_response/statements.json
@@ -39,7 +39,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/mod_forum/discussion_viewed/existing_discussion_viewed/statements.json b/tests/mod_forum/discussion_viewed/existing_discussion_viewed/statements.json
index 901216126302b2710429b59dd6654d3f20c21e2b..d65933479c8cae3d17b6d36c353a6b89bb9fd10a 100644
--- a/tests/mod_forum/discussion_viewed/existing_discussion_viewed/statements.json
+++ b/tests/mod_forum/discussion_viewed/existing_discussion_viewed/statements.json
@@ -39,7 +39,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/mod_forum/user_report_viewed/existing_report_viewed/statements.json b/tests/mod_forum/user_report_viewed/existing_report_viewed/statements.json
index 712d9ba6eb8202a5a94195204ffeec8df0b5e5f3..53dd25207efb70f90c16cdb140974fd28c5853ba 100644
--- a/tests/mod_forum/user_report_viewed/existing_report_viewed/statements.json
+++ b/tests/mod_forum/user_report_viewed/existing_report_viewed/statements.json
@@ -43,7 +43,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/statements.json b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/statements.json
index 2348dcc8ab37e61ed9b290aacb4c5b8c9ff658d8..bfb0634839d8f5aaffc5f37b23169c3043f8fdef 100644
--- a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/statements.json
+++ b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/statements.json
@@ -46,7 +46,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/mod_quiz/attempt_started/existing_attempt_started/statements.json b/tests/mod_quiz/attempt_started/existing_attempt_started/statements.json
index 3ff202180e1b529245a2c00755630ae7406cd916..b426a71f9cffb5088cf28f0b228cd88945255aa3 100644
--- a/tests/mod_quiz/attempt_started/existing_attempt_started/statements.json
+++ b/tests/mod_quiz/attempt_started/existing_attempt_started/statements.json
@@ -50,7 +50,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/mod_quiz/attempt_submitted/existing_attempt_submitted/statements.json b/tests/mod_quiz/attempt_submitted/existing_attempt_submitted/statements.json
index 4078b5b594a9d6c087343003f9f773285af17716..2dcfc406853b3c76a2352ba0fa89cf359d8615d1 100644
--- a/tests/mod_quiz/attempt_submitted/existing_attempt_submitted/statements.json
+++ b/tests/mod_quiz/attempt_submitted/existing_attempt_submitted/statements.json
@@ -61,7 +61,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/mod_scorm/sco_launched/existing_sco_launched/statements.json b/tests/mod_scorm/sco_launched/existing_sco_launched/statements.json
index de617c1f7831cbf9aa4effbefd1cd9f7d4372353..2fc9c02442d30f06ab84b06753e53e904aec4390 100644
--- a/tests/mod_scorm/sco_launched/existing_sco_launched/statements.json
+++ b/tests/mod_scorm/sco_launched/existing_sco_launched/statements.json
@@ -39,7 +39,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/statements.json b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/statements.json
index d31f3bd5d438ac69f7fc0b096e2f88048eeaddfc..6c4cb7287f65cd4489e54665959b640fb3447fdd 100644
--- a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/statements.json
+++ b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/statements.json
@@ -47,7 +47,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/mod_scorm/status_submitted/existing_status_submitted/statements.json b/tests/mod_scorm/status_submitted/existing_status_submitted/statements.json
index 22eddff872781850a7ffa822652f7f427a946f93..913144157441f64669c19a5116003069e65ee0f9 100644
--- a/tests/mod_scorm/status_submitted/existing_status_submitted/statements.json
+++ b/tests/mod_scorm/status_submitted/existing_status_submitted/statements.json
@@ -39,7 +39,7 @@
                     {
                         "id": "http:\/\/www.example.org",
                         "definition": {
-                            "type": "http:\/\/id.tincanapi.com\/activitytype\/site",
+                            "type": "http:\/\/id.tincanapi.com\/activitytype\/lms",
                             "name": {
                                 "en": "test_name"
                             }
diff --git a/tests/xapi_test_case.php b/tests/xapi_test_case.php
index 821d390e54109405d7cff2b3aca1f55d925e561c..632c6935f9d5b59412d0ee43dc79c42b5f14ba33 100644
--- a/tests/xapi_test_case.php
+++ b/tests/xapi_test_case.php
@@ -76,6 +76,7 @@ abstract class xapi_test_case extends PhpUnitTestCase {
             'source_lang' => 'en',
             'send_mbox' => false,
             'send_short_course_id' => false,
+            'send_username' => false,
             'plugin_url' => 'https://github.com/xAPI-vle/moodle-logstore_xapi',
             'plugin_version' => '0.0.0-development',
             'repo' => new \src\transformer\repos\TestRepository($testdata),