created new index and modified login check