Just a small catch: My friend was using formsauthentication and for some weird reason he was not able to redirect to the requested page even after successful login. It was a simple mistake in his code:
if you have FormsAuthentication enabled and creating a persistent cookie based on Remember Me check box selection, you need to make sure that for the other case, where the user does not select the checkbox, the method should have false set as the second argument, if by mistake you have set it to true, then the page will not redirect and will reload the same login page.
/*
* Redirect to originally requested page,persistent cookie not selected
*/
FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, false);