refactored the way of sending response in controller actions.
refactored Mailer component, EmailConfirmationBehavior and Registration controller.