some more changes to support login separately