Added alerts to success and error messages.