improve LoginQueryFactory