Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Login form broken: how to find and fix it fast

CNV-288High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

A login form is broken when a person with the right email and password cannot complete sign-in. It can fail in many ways: the button does nothing, the form shows an error for valid details, the page loads blank or returns a 500 error, or you are sent back to the login page again (a login loop).

This is not the same as a wrong password. The credentials are correct, but something in the page, the server or the session breaks the process.

Why it costs you leads or sales

Login is the door to your product. Trial users who cannot get back in never reach activation. Paying customers who cannot log in cannot use what they pay for, open support tickets, and may cancel. Shop customers who cannot log in may abandon checkout, especially when they have saved details or loyalty points.

Login failures are quiet. Nothing shows in your analytics as an error, and most users just leave rather than report it.

Where a broken login stops the journey
  1. Visit login pagePage loads
  2. Enter detailsCorrect email and password
  3. Submit formJS error or failed request
  4. DashboardNever reached
  5. Activation or purchaseNever happens

The user reaches the form, but sign-in fails, so every later step is lost.

Returning users who reach the dashboardExample numbers
Returning users who reach the dashboard (example)Login working: 92 users per 100 attempts; Login broken on one browser: 60 users per 100 attempts; Login broken for all: 0 users per 100 attempts0357192600Login workingLogin broken on one b…Login broken for allusers per 100 attempts

Example: illustrative numbers showing how a login bug cuts returning users reaching the product.

How to check if your site has it

Test your login form
  1. Use a clean browser session

    Open a private window with no extensions. Cached scripts and old cookies can hide or cause problems.

  2. Log in with a real test account

    Use a dedicated account you created for testing, with a known password. Try it on desktop and on a phone.

  3. Open DevTools

    Press F12 (or Cmd+Option+I on Mac). Check the Console tab for red errors and the Network tab for the login request. Look at its status code: 4xx or 5xx means a server or validation problem.

  4. Check the cookies

    In the Application tab (Chrome) look for a session cookie being set after submit. If none appears, or it is rejected, you will loop back to login.

  5. Try other browsers and a password manager

    Test Safari, Firefox and Chrome. Also try autofill, since some forms break when fields are filled without typing.

Common symptoms and likely causes
SymptomLikely cause
Button does nothingJavaScript error, script blocked, or a overlay covering the button
Error for valid detailsWrong API endpoint, CSRF token expired, or user database issue
Blank page or 500 errorServer error after a deploy or plugin update
Back to login pageSession cookie not saved (SameSite, domain or HTTPS mismatch) or bad redirect
Works on desktop onlyMobile layout hides or covers the button
Fails after a pauseCached page holds an expired security token

How to fix it

Fix the cause you found in the test above. The steps below depend on how your login is built.

Fix by platform
  1. Rule out plugins and theme

    Deactivate plugins one at a time (security, caching, login customiser plugins first), or switch to a default theme on a staging copy, and retest.

  2. Exclude the login page from caching

    In your caching plugin, exclude /wp-login.php, your custom login URL and account pages. Cached pages can hold an expired nonce (security token).

  3. Check the site URL

    Under Settings > General, make sure WordPress Address and Site Address use the same scheme (https) and domain, or cookies will not stick.

Show a visible error when the login request failsjavascript
const form = document.querySelector('#login-form');
form.addEventListener('submit', async (e) => {
  e.preventDefault();
  const msg = document.querySelector('#login-error');
  msg.textContent = '';
  try {
    const res = await fetch(form.action, {
      method: 'POST',
      body: new FormData(form),
      credentials: 'same-origin'
    });
    if (res.ok) {
      window.location.href = '/dashboard';
    } else {
      msg.textContent = 'Login failed (' + res.status + '). Please try again.';
    }
  } catch (err) {
    msg.textContent = 'Network error. Please try again.';
  }
});
Login before and after the fix

Broken

  • Button does nothing on submit
  • No error message shown
  • Cached page holds an old token
  • Users bounce back to login

Fixed

  • Submit sends the request and reaches the dashboard
  • Clear message if details are wrong
  • Login page excluded from cache
  • Session cookie saved correctly

How to confirm it's fixed

Confirmation checks
  • Login works in a private window on desktop and mobile
  • Works in Chrome, Safari and Firefox
  • Works with a password manager autofill
  • Console shows no red errors on the login page
  • Login request returns a success status and sets a session cookie
  • User lands on the dashboard and stays logged in after a page refresh
  • Wrong password shows a clear error, not a blank page

How to prevent it happening again

Prevention habits
  • Test login after every deploy, plugin update, theme change and tag or script change
  • Keep a dedicated test account that is never used by real people
  • Exclude login and account pages from page caching
  • Monitor server errors on the login endpoint
  • Review third-party scripts and popups added to login pages
  • Re-test after changing domains, HTTPS or cookie settings
How a login bug often unfolds
  1. Day 0

    A plugin or script update ships and breaks the login submit.

  2. Day 1

    Some users cannot log in but most do not report it.

  3. Day 3

    Support tickets appear. The team cannot reproduce it on their own cached browser.

  4. Day 5

    A clean-browser test finds the console error and the fix is released.

How FunnelGuard handles this

FunnelGuard detects a broken login form only partly. It does not scan your site for login problems on its own. It checks login when you configure it as a journey: the robot visitor runs the steps you set up (open the login page, fill the form, submit) on a schedule, from the EU or the US, and checks each step. If a step fails, it re-checks from a second region and then sends one alert (email, Slack, Teams, WhatsApp, webhook or PagerDuty) with a screenshot and a likely cause.

What it does not cover: logins you have not set up as a journey, problems that only affect certain browsers, devices or individual accounts, and steps that need extra verification. FunnelGuard never bypasses CAPTCHAs or bot protection, so a login behind those, or behind a 2FA code, cannot be fully tested by the robot.

You can start with the Free plan (1 site, 2 journeys, daily checks, no card), or try any paid plan free for 3 days. A free read-only website audit is also available.

Questions people ask

Why is my login form not working?

The most common causes are a JavaScript error that stops the submit, a failed server request, an expired security token from a cached page, or a session cookie that is not saved. Open DevTools in a private window, submit the form, and check the Console and Network tabs to see which one it is.

Why does my login button do nothing when I click it?

Usually a JavaScript error is stopping the form from submitting, or another element such as a popup or banner is covering the button. Check the Console for red errors and inspect the button to see if something sits on top of it.

Why does my login keep redirecting back to the login page?

The session cookie is probably not being saved or read. Common reasons are a mix of http and https, a cookie domain that does not match, a strict SameSite setting, or a redirect that sends the user to a page that requires login again.

Why does login say my password is wrong when it is correct?

The request may be reaching the wrong endpoint, the security token may have expired because the page was cached, or the account database may have changed. Check the Network tab for the response status and your server logs for the reason.

How do I test my login form properly?

Use a dedicated test account in a private browser window, on desktop and mobile, in more than one browser. Watch the Console and Network tabs and confirm you reach the dashboard and stay logged in after a refresh.

Can I monitor my login form automatically?

Yes, with a synthetic monitoring tool that runs the login as a scheduled journey. FunnelGuard can do this when you configure the login steps as a journey, but it cannot get past CAPTCHAs, bot protection or 2FA codes.

Will caching break my login page?

It can. A cached login page may hold an expired security token, so valid details are rejected. Exclude login and account pages from page caching in your caching plugin or CDN.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: login step + login_works: login_failed / login_timeout (Stage 14 test logins); a 5xx answer to the sign-in is reported as a server error (page_broken), not a wrong password or bot protection.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.