refactor email to send password to app users