ValidatePassword($userID, $password)) { $GLOBALS['user']->CreateSession($userID); if (isset($_GET['referral'])) { header("Location: " . $_GET['referral']); die(); } header("Location: /"); die(); } else { $error = "Username or password incorrect"; } } else { $error = "Username or password incorrect"; } } $body = '