Locale gets undefined in the login page

While use i18n.locale it is undefined so those pages use the
storedLanguage that page gets failed to load.

Change-Id: I11b45f42d06bb355f561d5c1e93f7516775b1c81
Signed-off-by: Surya Venkatesan <suryav@ami.com>
diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue
index 0878d0e..32d4636 100644
--- a/src/views/Login/Login.vue
+++ b/src/views/Login/Login.vue
@@ -69,7 +69,6 @@
 import { useVuelidate } from '@vuelidate/core';
 import { ref, watch } from 'vue';
 import { useI18n } from 'vue-i18n';
-import i18n from '@/i18n';
 import Alert from '@/components/Global/Alert';
 import InputPasswordToggle from '@/components/Global/InputPasswordToggle';
 
@@ -134,10 +133,10 @@
       this.$store
         .dispatch('authentication/login', { username, password })
         .then((PasswordChangeRequired) => {
-          localStorage.setItem('storedLanguage', i18n.locale);
+          localStorage.setItem('storedLanguage', this.userLocale);
           localStorage.setItem('storedUsername', username);
           this.$store.commit('global/setUsername', username);
-          this.$store.commit('global/setLanguagePreference', i18n.locale);
+          this.$store.commit('global/setLanguagePreference', this.userLocale);
           if (PasswordChangeRequired) {
             this.$router.push('/change-password');
           } else {