variável de conexão ausente
$con
$query=mysqli_prepare($con,"select user_id from users where user_name= ? and
password= ? ");
e mude isso também
$query->bind_Param("ss", $unsafe_username, $unsafe_password);
^^^
$con
$query=mysqli_prepare($con,"select user_id from users where user_name= ? and
password= ? ");
$query->bind_Param("ss", $unsafe_username, $unsafe_password);
^^^