Customize login block's position in page.tpl
You can do it like this:

if(!user_is_logged_in() ){
    $userLoginForm = drupal_get_form('user_login');
    print drupal_render($userLoginForm);
}


because drupal_render receives argument as reference..