better login check