Fix #2: Show 404 when accessing unpublished pages

Show 404 error when accessing unpublished pages and categories on the frontend.