In Windows forms, if you want to set the current user, all you have to write is:
Thread.CurrentPrincipal = new CustomPrincipal(new CustomIdentity("login", "password"));
But in ASP.NET you can not ask the current thread for the user, because you will get the same thread on every request... so.. where should you store this information? It seems that the place is in the HttpContext.User Property as described on devx
I think I should look more into this...