added email authentication and remember_me functionality