Try something like:
<?php
header('Content-type: application/json');
include_once('core/includes/master.inc.php');
if($_REQUEST)
{
// clear any expired IPs
bannedIP::clearExpiredBannedIps();
// do login
$loginUsername = trim($_REQUEST['username']);
$loginPassword =...