Generate usernames and passwords.

Closes #3085. Closes #3155. Part of #3248.