Fixed redirects and added success/error messages