Barca back on top as Messi nets on 500th appearance