Loginfactory fix
Karma code coverage added