added email validation and flash errors to person