Fixed email setting and replacecd the deafult mail function
inproved login security