Specify correct layout when validation fails

Add flash message and handling to layout.

Closes #59