title: Wordpress WP_Login
body: <p>I'm trying do get a java mesage after login in wordpress.
  Here is my code:</p>
  
  <pre><code>function myFunction()
  {
  ?&gt;
  &lt;script&gt;
  alert('test');
  &lt;/script&gt;
  &lt;?php
  }
  
  add_action( 'wp_login', 'myFunction' ); 
  </code></pre>
  
  <p>I had a sidebar login widget. If i replace wp_login with get_header it works.
  Why does the wp_login not working ?</p>