Added code to add the user and also to generate password emails.