Added form validation.
- Added to the login page as well as registration page