check login & logout