fixed stored session redirect per sevenseacat's suggestion