I am experiencing a strange issue. I have an ASP.Net web application that uses Forms Authentication. If I open the log-in page and there is a couple of minutes of inactivity
You are getting an execution timeout because the ASP.NET application hasn't returned back to IIS after the default timeout interval.
http://msdn.microsoft.com/en-us/library/e1f13641.aspx
This doesn't explain why it is taking so long. You could increase the default timeout of 110 seconds which might allow you to troubleshoot it better, other then that you should try to debug the code as the reason is not apparent in the ASP.NET sample posted.
To change the default specify the executionTimeout
of httpRuntime
in your web.config.
If you are connecting to a database to do the authentication you could look there and trace if and what is received.