Allen closes the portal forever, sacrificing his only way home to save Josh - and the planet - from the wormhole.