Exhibit 10.5 STOCK AND WARRANT PURCHASE AGREEMENT