Previously, I had added login.aspx to the Default Document section in IIS.
However, when someone was accessing the application, it was required to login twice. The first one wouldn't say any error message or no redirection to the next page in the application. And the second one would actually redirect the user to the expected page. And the user was using the right credentials both times.
As soon as I deleted login.aspx from the Default Document section in the IIS, and the user provided the full link to the application (~/login.aspx), the problem was gone as it was only required to login once.
Does anyone know why this is happening?
In order to solve this problem, in the Page_Load event of the Default Document, it must be checked the following:
Source: asp.net Form Authentication change .net 2 to .net4