Fix saving passwords

Passwords would get overwritten again on line 68 while looping through the form elements
Merge pull request #1 from darookee/fix-passwordgeneration

Fix saving passwords