validation fixed for username and password field