Pre-Built Theme, how to transfer header to blocks
Essentially you have the User Login &amp; Search Form blocks so you could add the following to your themes' .info file:

regions[login] = Login
regions[search] = Search


Clear the site cache and visit your Blocks page (admin/structure/block) and you should see 2 additional regions. Place the User Login block in the Login region and the Search Form block in the Search region.

In page.tpl.php in your theme, use the following code:

&lt;?php if (!empty($page['login'])): ?&gt;
&lt;div class="dropdown animated fadeInDown animation-delay-11"&gt;
  &lt;a href="user" class="dropdown-toggle" data-toggle="dropdown"&gt;&lt;i class="fa fa-user"&gt;&lt;/i&gt; Login&lt;/a&gt;
  &lt;div class="dropdown-menu dropdown-menu-right dropdown-login-box animated fadeInUp"&gt;
    &lt;?php print render($page['login']); ?&gt;
  &lt;/div&gt;
&lt;/div&gt; &lt;!-- dropdown --&gt;
&lt;?php endif; ?&gt;

&lt;?php if (!empty($page['search'])): ?&gt;
&lt;div class="dropdown animated fadeInDown animation-delay-13"&gt;
  &lt;a href="/search/node" class="dropdown-toggle" data-toggle="dropdown"&gt;&lt;i class="fa fa-search"&gt;&lt;/i&gt;&lt;/a&gt;
  &lt;div class="dropdown-menu dropdown-menu-right dropdown-search-box animated fadeInUp"&gt;
    &lt;?php print render($page['search']); ?&gt;
  &lt;/div&gt;
&lt;/div&gt; &lt;!-- dropdown --&gt;
&lt;?php endif; ?&gt;


This will give you a starting point and you can start overriding output in your theme by using functions and templates. It should be possible to achieve almost the exact code you're looking for.

You're obviously using Bootstrap, have you tried using the Drupal Bootstrap theme as a starting point?