<?php if (arg(0) == 'user') { switch (arg(1)) { case NULL: if (!user_is_logged_in()) drupal_set_title(t('Log in')); break; case 'register': drupal_set_title(t('Register')); break; case 'password': drupal_set_title(t('Request new password')); break; case 'login': drupal_set_title(t('Log in')); break; } } ?>
body class based on taxonomy term can easily be done with the context module. No coding at all: condition: select the taxonomy term action: theme html: action class