fix the problem of searching while logged in