How to assign the user login block to header region
The Drupal core User login block doesn't display a login/logout link; it only displays a form for logging in an anonymous user. If you want a block to display logout, the User Menu block displays user-specific menu links that also includes a logout link when a user is logged in.