      my $params        = shift;
 @@ -1697,6 +1703,9 @@ will be created.
  =cut
- 
+
  sub get_session {
 +    _get_session(@_);
 +}

+++ b/C4/Auth.pm
@@ -155,6 +155,9 @@ Output.pm module.
 =cut
 
 sub get_template_and_user {
+    _get_template_and_user(@_);
+}
+sub _get_template_and_user {
 
     my $in = shift;
     my ( $user, $cookie, $sessionID, $flags );
@@ -1592,6 +1595,9 @@ Possible return values in C<$status> are:
 =cut
 
 sub check_cookie_auth {
+    _check_cookie_auth(@_);
+}

+    }
+
+    #warn "decoding($data)";
+    my ($out, $headers, $err) = do {
+        local $_;
+        eval {
+            $_ = $JSON->decode($data);
+            1;
+        } or die "Can't decode from child: '$data'";
+        @$_;
+    };
+
+    my $code = 200;
+    if (length $err) {
