added check to make sure the user is log in

added check to make sure the user is log in  before showing  search box.