Added alert and error flash messages.