login & logout, fixes #2