added email exists check