validate ec login & logout