Adding the Admin Bar to a page with a custom template

Not sure exactly, but adding the following two functions should get it to work and save you other headaches as well:

Right before the closing head tag add:

<?php wp_head(); ?>

And right before the closing body tag add:

<?php wp_footer(); ?>