1. Home
  2. Docs
  3. Plugin Documentation
  4. Troubleshooting
  5. Can’t log in or register to my website

Can’t log in or register to my website

Symptoms

The loader remains stuck on the screen, user can’t log in ore register and the browser console returns error 403 on page admin-ajax.php

Possible causes

This can happen if you are using caching plugins. StranoWeb Ajax Login adds nonce to login, register, forgot password and change password to increase security.
A “nonce” is a token that can only be used once and are often used to prevent unauthorised people from submitting data on behalf of another person.
As the nonce is added as a hidden form element, it will also end up being cached by some caching plugins. This can cause some issues with nonce verification.

Solution 1

If you are using one of the following caching plugins:

LiteSpeed Cache

  1. Go to LiteSpeed Cache admin page and click on Show Advanced Options tab:
    swal troubleshooting litespeed 1
  2. Click on tab “(9) ESI” and then click on Enable ESI ON to activate it:
    swal troubleshooting litespeed 2
  3. On the backend admin bar find the LiteSpeed Cache icon and click on “Purge LSCache”:
    swal troubleshooting litespeed 3

WP Rockets

After the cache gets cleared, the HTML gets regenerated and references a correct nonce again. Hence, when your WordPress setup (theme, plugins) operates with nonces, the only way to keep them updated on cached pages is to set your Cache lifespan option in WP Rocket to a value below 12 hours; 10 hours would be a starting point, but you may have go down to 8 or even less.

Solution 2

Disable StranoWeb Ajax Login nonces

If none of the previous solutions work, the only way is to disable nonce verification.
Note: WordPress default login, register, forgot password forms don’t use nonce verification!

  1. Go to StranoWeb Ajax Login admin page on Advanced tab and click on Disable SWAL nonce;
    SWAL Troubleshooting disable nonceThe nonce hidden input fields will still appear on the forms but won’t be any verification on them;