How Can I Improve/Secure My Login Script?
Rather than an else statement to set false on invalid username/password why not just default to false and only set to true if it worked. Also do you care unless both are valid?

$validUserAndPassword  = false;

if (CheckEmpty($_POST['username']) &amp;&amp; CheckEmpty($_POST['password']))
{
    $username = $_POST['username'];
    $password = $_POST['password'];
    $validUserAndPassword = true;
}


The DB is an expensive resources. There is no point in connecting to the DB or even getting stuff from the DB unless you have a valid username and password.

$ result = array();
if ($validUserAndPassword)
{
    AllYourBase();

    $query = mysql_query(sprintf("SELECT * FROM Users WHERE username = '%s'", 
                mysql_real_escape_string($username))) or die(exit());
    $result = mysql_fetch_assoc($query);
}


I am pretty sure that splitting the salt provides little extra entropy.

// Split the Salt
$fs = substr($result['salt'], 0, 10);
$ls = substr($result['salt'], -10);

// Add The Salt
$pass = md5($fs.$password.$ls); 


I think doing authentication your self is a bad idea (this is a specialized field with lots of gotchas). Anway don't you want to spend time on your application rather than doing mundane tasks like authentication?

I am not an expert on front-ends so I have no good recommendations on packages that can do it for you. But I did play around with openid-selector (available via google source), which is the same authentication package that the stack exchange sites use. This allows the users to login-in to your site using the open-id credentials (google/open-id/facebook/yahoo/stack-exchange)).