login & logout function completed