hooked up success and error notifications to form