Fix problems of authorization. Search implemented