wordpress login form on the header

Solution:

If you want to display the full login form, you don’t need to code in a new form. Just use the wp_login_form() function.

<?php wp_login_form(); ?>