Fixing search controller and enabling anonymous search
Adding debug output