When users try to reset their passwords clicking on Reset your password, they are fine until they click on the Log in button that shows a message similar to the following one.
This is a one-time login for foobar and will expire on Tue, 20/09/2016 - 15:25. Click on this button to log in to the site and change your password. This login can be used only once.
When users click on the log in button, they get a 404 error, for a page whose URL is similar to http://example.com/user/reset/123/1474293937/ukVdmEMWoYablzZHPYJzMa30-p_skkDv06d564V1KHQ/admin.
Users are logged in and they edit their account to change password. I don't like that users get a 404 error page, which could confuse them.
Why do users see a 404 error?