Implemented error handler and success page with redirect