updated search, added index/login logic