fixed authorization and added search