I have a master page where I have a login button in the header. That button opens up a modal panel, using an ajax control, modal popup extender. I put my login control in that modal popup. When I try to open a secured page as an anonymous user I get an error:

Code:
The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

Requested URL: /login.aspx
How can I set it up where instead of going to the error page it fires the modal popup window instead.

Warning! I am fairly new to ASP.NET and Web development / programming in general. I am fairly proficient in C#. So I won't be offended if you explain it to me in "infant" terms.

Thank you in advance!