Well, you secure your services on ArcGIS Server, but as far as a login screen to get to your app, that's outside the scope of the API. You could use something like .NET MVC to secure access to load your URL. Passing that authentication on to the secured services is something on my list of "you should look into this", but haven't gotten around to yet. If you dont need to actually secure the services, then just sitting the page behind some form of authentication like you would with any other web app would do the trick.