page-name.php doesn’t execute on custom template

Don’t name your custom page template files page-{foobar}.php. Doing so will cause just this conflict with the Template Hierarchy for static pages:

  1. custom template file – The Page Template assigned to the Page. See get_page_templates().
  2. page-{slug}.php – If the page slug is recent-news, WordPress will look to use page-recent-news.php
  3. page-{id}.php – If the page ID is 6, WordPress will look to use page-6.php
  4. page.php
  5. index.php

Which means that, if you assign a custom page template to the page, WordPress will use that, first and always.

Solution:

  1. Rename page-login.php as template-login.php
  2. Add the Template Name: Login Page to template-login.php
  3. Assign the Login Page template to your static page named “Login”