Added login & logout method.