this version using email for register and login
