added email and password check