Login form on restricted page doesn't accept login credentials
A possible explanation for what is happening is that this is implemented via some custom rule, created with the Rules module (at least that's how it "could" have been implemented with a rather basic custom rule).

So if you have the Rules module enabled in your site, you may want to do some Rules debugging, as explained in my answer to "How can I display the value of a variable inside a condition?".