added email auth and more