SERIES B PREFERRED STOCK AND WARRANT PURCHASE AGREEMENT