fixed factory to loginFactory