switched to APIs and added in send email to reset password