require_login();
This will redirect the user to the login page, if they're not already logged in ('guest' is considered logged-in for these purposes).
You will then want to check the user has permission to access the page, by defining a suitable capability (in YOURPLUGIN/db/access.php ) and checking it via:
require_capability('PLUGINTYPE/PLUGINNAME:CAPABILITYNAME', context_system::instance());
Assuming the 'guest' user doesn't have that capability, this will prevent them from accessing your page.
As an alternative, you can write:
is_siteadmin() || die('Site admins only');
(but that only works if you want to restrict the page to site admins only).
You can also access further information about the logged in user via the $USER global.
A couple of other corrections to your code - use 'context_system::instance()', not 'get_system_context()'. It is better to write:
new moodle_url('/blank_page.php')
instead of
$CFG->wwwroot.'/blank_page.php'
Also, leave out the final '?>', as that will help to prevent whitespace problems.