Yes you can use session_destroy() on the same page as session_register().
Try this:
if (isset($submit) && !empty($username)) {
session_destroy();
session_register($username);
}
Remember, for added security, turn REGISTER_GLOBALS to OFF in your php.ini file, and start using $REQUEST['username'], $REQUEST['submit'], ...