added flash messages on registration errors