Return 404 for API errors
Correct template name for token failure