Fix bug with invalid authentication token