The Hammers had a goal disallowed before Nottingham Forest scored a late winner from a disputed penalty.