minor adjustments to process registration to make sure the session is stored.