fixes the method to get token via user credentials