Added error and success pages with simple backend logic to redirect