title: The plugin doesn't activate in VueJS
body: <p>I tried to use <a href="https://github.com/dgrubelic/vue-authenticate" rel="nofollow noreferrer"><code>vue-authenticate</code></a> in my app, but I've some problems using the plugins' methods. This plugin has as dependency <a href="https://github.com/pagekit/vue-resource" rel="nofollow noreferrer"><code>vue-resource</code></a>, so the first step is installing both packages.</p>
  
  <p>The in <code>main.js</code> file, I import <strong>and activate</strong> both packages, including the specific configuration for local authentication:</p>
  
  <pre><code>import Vue from 'vue'
  import VueResource from 'vue-resource'
  import VueAuthenticate from 'vue-authenticate'
  // ...
  Vue.use(VueResource)
  Vue.use(VueAuthenticate, {
    baseUrl: 'http://sgc-server.dev',
    tokenType: 'Token'
  })
  </code></pre>
  
  <p>Now, in my login component, named <code>Login</code>, create a method, called <code>aLogin</code> to avoid name conflicts:</p>
  
  <pre><code>// ...
  methods: {
    aLogin: (_credenciales) =&gt; {
      this.$auth.login(_credenciales).then((_carga) =&gt; {
        // Ejecutamos la lógica que sigue a un login exitoso
        console.log(_carga)
      })
    }
  } 
  // ..
  </code></pre>
  
  <p>In this component, <code>credenciales</code> is an object, defined in <code>data()</code> with two properties, <code>username</code> and <code>password</code>. The method <code>aLogin</code> is called in a form on <code>submit</code> event.</p>
  
  <pre><code>&lt;form class="form" @submit.prevent="aLogin(credenciales)"&gt;
  </code></pre>
  
  <p>But nothing happen, and have this in the console.</p>
  
  <pre><code>Login.vue?8031:64 Uncaught TypeError: Cannot read property 'login' of undefined
      at VueComponent.aLogin (eval at &lt;anonymous&gt; (app.js:1987), &lt;anonymous&gt;:18:18)
      at Proxy.boundFn (eval at &lt;anonymous&gt; (app.js:735), &lt;anonymous&gt;:125:14)
      at submit (eval at &lt;anonymous&gt; (app.js:7875), &lt;anonymous&gt;:21:13)
      at HTMLFormElement.invoker (eval at &lt;anonymous&gt; (app.js:735), &lt;anonymous&gt;:1657:18)
  </code></pre>
  
  <p>Why the <code>this.$auth</code> is <code>undefined</code> if it is already registered in <code>main.js</code>? How can activate it properly?</p>
  
  <p>Thanks in advance. </p>