Added error page and rerouting