better login finding structure