fixing faulty logic in password reset and mailing logic

- mails were sent but success message rendering for end user were broken because of double rendering issue