Fixed User.generatePassword method. Fixes #95