James Ward-Prowse set up two goals on his West Ham debut and Lucas Paqueta scored a late penalty as the 10-man Hammers somehow secured a 3-1 win over Chelsea.