Both mice are very similar, but the g402 has a slightly better sensor and I personally prefer it to the shape of the g400s. Don't believe the "world's fastest mouse" or "fusion engine technology" bullshit about the g402, it has the same malfunction speed as the g400s. While the g402 is imo better than the g400s, the g502 is better than both of those as it has a nearly flawless sensor with a super high malfunction speed, but it will run you about 80 bucks.
If you're on a budget, the g402 is the way to go as it's only 10 dollars more than the g400s and it is superior in pretty much every way (it also has more buttons than the g400s, if that's your thing)
but if you can spend it, get the g502 because almost nothing can outperform that...