simplified login caching
more testcoverage