login (u, p) {
    return axios.post(ENDPOINT_PATH + 'login', {
        headers: {},
    },
    {
        auth: {
          username: u,
          password: p,
        },
    }).then(response => {
      console.log(response.data.token)
      this.setUserLogged(response.data.token)
      return response
     //  console.log(response.data.token)
   },
    )
  }
// Function to call login on API
Function to call login on API
Function to call login on API
login (u, p) {
    return axios.post(ENDPOINT_PATH + 'login', {
        headers: {},
    },
    {
        auth: {
          username: u,
          password: p,
        },
    }).then(response => {
      console.log(response.data.token)
      this.setUserLogged(response.data.token)
      return response
   },
    )
  }
login ( u , p ) { return axios . post ( ENDPOINT_PATH + 'login' , { headers : { } , } , { auth : { username : u , password : p , } , } ) . then ( response => { console . log ( response . data . token ) this . setUserLogged ( response . data . token ) return response } , ) }
Function to call login on API
Function to call login on API
//  console.log(response.data.token)