added renderMessages and validated the html file