if the user is logged in, the User_ID session variable should have a value.
the issue you are having is that you chjecking to see if the session is set. The session could very well be set but have a blank value. you need to check both conditions, is set AND not equal to a blank string:
if (isset($_SESSION['User_ID']) && $_SESSION['User_ID'] != "") {