validates user email and password