Refactor header building
Ignore bad cookies
Test bad cookie
Split in two templates
Add a custom error 500 handler