Added login functions and search adjusted to search with Sphinx Search Engine