I'm glad it worked out for you. In general when I'm doing this type of thing in the session I will set the values to variables then have just these lines of code:
session_destroy();
unset($_SESSION);
session_start();
session_regenerate_id();
This would kill off the current session and create a new one for you. Yours is just doing a little more than this.