Refactoring: added password generation util
fixed changing email