fixed defects for search method and redirecting unauthorized user
merging commits