Unlicensed operation of medical marijuana facilities to end Oct. 31 under new rules