Added function for generating passwords.