title: How to stay logged in even after page refresh with vuex ?
body: <p>In order to login, I'll call a third-party API which will provide me the access token. </p>
  
  <p>this is my store.js code which contains vuex</p>
  
  <pre><code>/* eslint-disable */
  import Vue from 'vue'
  import Vuex from 'vuex'
  
  Vue.use(Vuex)
  
  export default new Vuex.Store({
      strict: true,
      state: {
          token: null,
          isUserLoggedIn: false,
          userEmailAddress: null
      },
      mutations: {
          setToken (state, token) {
              state.token = token
              if (token) {
                  state.isUserLoggedIn = true
              } else {
                  state.isUserLoggedIn = false
                  this.$router.push('login')
              }
          },
          setEmailAddress (state, emailAddress) {
              state.userEmailAddress = emailAddress
          }
      },
      actions: {
          setToken ({commit}, token) {
              commit('setToken', token)
          },
          setEmailAddress ({commit}, emailAddress) {
              commit('setEmailAddress', emailAddress)
          }
      }
  })
  </code></pre>
  
  <p>Because I am not using passport, how can I make the user stay logged in even after they refresh the page ? </p>