Fix authentication failure code