Try that. You bound the results of the query, but you never actually fetched them. That's an issue which has stumped me before, as well.
$currentUN = $_SESSION['username'];
$currentPWD = $_SESSION['password'];
$mysql = new mysqli(DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME) or die('There was a problem connecting to the database');
$stmt = $mysql->prepare('SELECT DISTINCT id FROM users WHERE username=? AND password=? LIMIT 1');
Also, not a bad idea to check to make sure your SQL is valid, if you're still having errors. We can't confirm that for you.