check login info with ajax in index