added logEmail
added logEmail
fixed email bug