Introduction to variational methods for viscous ergodic mean-field games with local coupling