added basic form validation for authentication and messaging