I'm not sure what you mean by filter based on logged in status. You are already filtering based on a session variable that is set when they log in, so it should be using the logged in user record.
To only update the password when it has changed, bind the value to:
<?php echo(($_POST["Password"] != "")?$_POST["Password"]:$row_SecurityAssistpcms2_users['UserPassword']); ?>