log mails and log last login date of user