Set HTTP headers for 404 and no permission pages.
Show no permission page for admin pages if the user is logged in.