fixed search and added logout button to main