function isValidUser($type = "normal")
{
    include_once "user_backend.php";
    $bUser = new user_backend("login");
    if ($bUser->checkSession()) {
        return 1;
    }
    if ($bUser->checkLogin($_POST["username"], $_POST["password"], $type)) {
        return 2;
    }
    return false;
}