fixed mailer  and logouts bugs