check length and confirm password in javascript