Fixed email and logout issue