added authentication and search functionality