Drupal.behaviors function can't detect Views object when user is Anonymous
I found that solution that works for me even under anonym.
Stars - changes

(function ($) {
    Drupal.behaviors.myViewsRefresh = {
    attach: function( context , settings) {

        **var viewName = 'ajax_test';**

        // View is Ajax enabled,
        // and is available as a property of the Drupal object
        // like so...
        **var instances = settings.views.ajaxViews;**
        var targetedView;

        // iterate thru the various
        // views instances name to find your views
        $.each( instances , function getInstance( index, element){
                    if(**element.view_name** == viewName ){
                            targetedView = '.view-dom-id-' + **element.view_dom_id**;
                    }
        });

        // Define your button click here...
        $('.viewsrefreshbtn').click( function(){
                if(typeof targetedView !== 'undefined'){
                    $(targetedView).trigger('RefreshView'); 
                    console.log ('Clicked refresh btn on view. View Refreshed');
                }
                else {console.log ('Can\'t find viewName on this page');}
        });            
    }
}
})(jQuery);