Add and customize login block on page.tpl
you can do it like this:

$block = block_load('user', 'login');
$block = _block_render_blocks(array($block));
$block_build = _block_get_renderable_array($block);

print drupal_render($block_build);


this will generate a block with title and contexual links also..