Implemented logic for anonymous users searching