 Auth = {
    username: &quot;&quot;,
    password: &quot;&quot;,

    setUsername: function(value) {
        Auth.username = value
    },
    setPassword: function(value) {
        Auth.password = value
    },
    login: function() {
        m.request({
            url: &quot;/api/v1/auth&quot;,
            data: {username: Auth.username, password: Auth.password}
        }).then(function(data) {
            localStorage.setItem(&quot;auth-token&quot;, data.token)
            m.route.set(&quot;/secret&quot;