added checking of the email and password