added required check, empty password field check