I've multiple wordpress installations on my small page. I wish to produce a single login page on their behalf all. "One form to rule all of themInch

Can One do this using PHP? (I'd rather not show the URL:of the web pages within the HTML)

<?php

// the php login file

$page =  $_POST["page"];
$user =  $_POST["user"];
$password =  $_POST["password"];

if($page == 'page1' && $user == 'mreditor' && $password == 'secure123'){

    // submit a new post to http://mydomain.com/page1/wp-login.php with username "customUsername" and password "customPassword"

}

?>

During my wordpress function file I've place the following to create shoreline no-one can access the page without having to be drenched in:

<?php

if (!is_user_logged_in())
{
header("Location: http://mydomain.com/login");
exit();
}

?>