How can I add a separate template for the user login form?
You can add a theme name suggestion in a hook_theme_suggestions_HOOK_alter:

function mytheme_theme_suggestions_form_alter(&amp;$suggestions, $variables) {
  if ($variables['element']['#form_id'] == 'user_login_form') {
    $suggestions[] = 'form__user_login_form';
  }
}


If you want to add suggestions for form elements you need some more code. See the file themable_forms.module from the module Themable forms. This is the only code file in this module and it is a good example how you can approach this in form alter, preprocess form element and theme suggestions hooks.