redirect_header(XOOPS_URL."/modules/".$GLOBALS["artdirname"]."/index.php", 2, art_constant("MD_NOACCESS"));
to:
redirect_header(XOOPS_URL."/user.php", 2, art_constant("MD_NOACCESS"));
this works like this: if you are not loged in, sends you to the login page, once you login there you go back to submit as expected.
I havent managed to make it go back if you click register from there (say you are not registered instead of not loged in) but I think this is an improvment..both should be better though.