refactored flash errors and made it so an email can only be registered once