why does my 'click' addEventListener getting called on pageload
<p>I have a button with id #login and a javascript file with this line:</p>

<pre><code>document.getElementById('login').addEventListener('click', 'LoginPressed()')
</code></pre>

<p>As a test, I made this function:</p>

<pre><code>function LoginPressed(){
  console.log('was login pressed already??')
}
</code></pre>

<p>And my function is getting called every time the page loads. How do I stop that from happening?</p>

<p>Note, I've also tried the callback not in quotes, and not as a function:</p>

<pre><code>document.getElementById('login').addEventListener('click', LoginPressed())
document.getElementById('login').addEventListener('click', LoginPressed)
document.getElementById('login').addEventListener('click', 'LoginPressed')
</code></pre>