Fixed login check helper