custom triggers will not be retained, the extension is not able to recognize your custom trigger code, so will replace it with one of the standard triggers.
your best bet would be to use the before page load trigger in the extension, then add the custom trigger as separate code around the block for the behavior.
for example:
<?php
//custom trigger
if(!isset($_COOKIE["autoLogin"]){
?>
<?php
if("" == "") {
.....rest of update code...
}
?>
<?php
//end custom trigger
}
?>