West Ham United secured their first back-to-back Premier League wins of the season by defeating Leicester City 2-0 on Thursday night.