Here is a solution (hopefully)
I added a check in the header that redirects users that are not logged in to the login page. The example is for only one protected page but I guess its possible to do this in a similar way with more pages.
<?php
# First get the page url
$host = $_SERVER[‘HTTP_HOST’];
$self = $_SERVER[‘PHP_SELF’];
$query = !empty($_SERVER[‘QUERY_STRING’]) ? $_SERVER[‘QUERY_STRING’] : null;
$url = !empty($query) ? “http://$host$self?$query” : “http://$host$self”;
# Check if user is logged in. If not redirect
if ( !is_user_logged_in() && $url == “http://myprotectedpageadress”){
header(‘Location: http://myloginpage’);
}
?>