Updating error handling with searches. Errors are pretty, now.

Also added the "Invalid id" error
Redirecting to 404 if requested page isn't in the authorized ones
Better looking errors, more error cases