Improvements on resource loading.

Include:
- Enable parallel resource loading.
- Fix some bugs related to unexpected 404 redirects
- Fix Missing redirects to error page when api server is down.