Improved error-handling between backend and frontend

- Force all PHP errors from backend pages to be logged instead of
written to the page.
- Introduced 404 error page, which JS functions redirect to when they
encounter a "fatal" error such as not being able to retrieve user
details.