Re: can I put the login form in the header?
There shouldn’t be a problem having the login-form inside a widget ( side-bar ) as that’s how it is in the bp sidebar ( sidebar.php in bp-default theme ).
Regardless of the above, copy the form code from sidebar.php and insert it anywhere you like ( header, footer.. ), you can contain the form in a div, styling it to suit your needs.
Take note that if you are not using a child theme, your changes will be over-written when you upgrade buddypress. ( https://codex.buddypress.org/how-to-guides/building-a-buddypress-child-theme/ )
This should be the login/log out form used in the bp-default theme: http://pastebin.com/gngAD97g