added some of anish's suggestions, fixed bug with login via email before checkout