fixing bug with search looking at profile of unauthenticated user