Login/logout plus unit test corrections