added middlewares for error handling

add two new views for 404 and not found