Fixed a missing json.loads().

Added 500, 400, and 404 pages.