How to show/hide login block on main page based on button in header?
Your first approach you can consider as best as we won't be actually touching the core Drupal functionality and creating our custom module to tweak the core. You can also have a look at logintoboggan module it may help you to get the drop down effect for login form and login block on click of link once you do the configurations for the loggintoboggan. you may need to additional theming and some jquery code to tweak it more for signup.

Hope it helps.