Modularize the flash error, add error for responses

The reponses will now handle errors and display the message back to the user
The flash error will now display the message passed by the controller