fixed some login and email bugs