Make 404 template extend base.html

This refactor eliminates a lot of code duplication