How to stop macbook from playing youtube videos at login screen?
Option A: Simply hit the speaker icon (Mute key) on login.

Using the Apple Keyboard


Using a MacBoook with Touch Bar


Option B: Global setting to turn off websites that automatically play media.

Open Safari > Preferences > Websites > When visiting other websites > Stop Media with Sound