[Kerry] fix iphone couldn't login issue & add security check & add rails mailer