added login form validation