title: How Can I set my authtoken to null when logging out? Vuejs
body: <p>This is what is in my login page where I set the token and place it in a cookie, I am wanting to create a function to put on the logout button that removes this authtoken form the cookie</p>
  <p>login: function () {</p>
  <pre><code>        axios
  
              .post(`${this.api}/op/auth/login`, this.loginCredentials, {
                  headers: { 'Content-type': 'application/json' },
              })
              .then((response) =&gt; {
                  this.setCookie(response.data)
                  console.log(JSON.stringify(response.data))
  
                  this.$setToken(response.data)
  
                  if (parseInt(this.$operator()) === 0) {
                      this.$router.push('/operators')
                  } else {
                      this.$router.push(`/operators/${this.$operator()}`)
                  }
              })
              .catch((error) =&gt; {
                  alert(JSON.stringify(error))
                  if (error.response) {
  
                      this.showError('Account Not Authorised')
                      console.log(error.response.data)
                      console.log(error.response.status)
                      console.log(error.response.headers)
                  } else if (error.request) {
                      console.log(error.request)
                  } else {
                      console.log('Error', error.message)
                  }
              })
      },
  </code></pre>