javascript for generating passwords is working