diff --git a/Koha/Plugins/Base.pm b/Koha/Plugins/Base.pm
index 3b0ab15747..3a8dc6384a 100644
--- a/Koha/Plugins/Base.pm
+++ b/Koha/Plugins/Base.pm
@@ -24,11 +24,6 @@ use Module::Pluggable require => 1;
use base qw{Module::Bundled::Files};
use C4::Context;
-use C4::Auth;
-
-BEGIN {
- push @INC, C4::Context->config("pluginsdir");
-}
=head1 NAME
@@ -108,6 +103,8 @@ C4:Template, but at the moment, it does not.
sub get_template {
my ( $self, $args ) = @_;
+ require C4::Auth;
+
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{ template_name => $self->mbf_path( $args->{'file'} ),
query => $self->{'cgi'},
diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml
index 73d67bf7eb..22529ac5cd 100644
--- a/etc/koha-conf.xml
+++ b/etc/koha-conf.xml
@@ -277,6 +277,7 @@ __PAZPAR2_TOGGLE_XML_POST__
authorities
1
__PLUGINS_DIR__
+ 0
__INTRANET_CGI_DIR__
__OPAC_CGI_DIR__/opac
__OPAC_TMPL_DIR__