Hello I had this problem...the panel solution works but you have to convert the login control to template .
In order to do this:
- switch to design view
- Click the arrow in the right upper corner.
- Click convert to template
- Your going to see the layout in html of the login control
- Search for the <LayoutTemplate> tag
- Put your panel in
- Close your panel before the layout close <LayoutTemplate/>
- set the panel defaultbutton property with the name of the login button in most cases LoginButton
And thats it very easy :) !!!
Hope this help
Juan
This is my login control after this steps
<asp:Login ID="lngMainLogin" runat="server" CssClass="alignleft"
DestinationPageUrl="~/AdminTool/BarriosUrb/Default.aspx"
FailureText="No hemos podido validar su información. Verifique su username o su password."
PasswordRecoveryUrl="~/UserHelp/ForgotPass.aspx"
PasswordRequiredErrorMessage="Password es requiredo."
UserNameRequiredErrorMessage="User Name es requiredo."
onloggedin="lngMainLogin_LoggedIn" onloggingin="lngMainLogin_LoggingIn" >
<LayoutTemplate>
<asp:Panel runat="server" ID="pnlLogin" DefaultButton="LoginButton">
<table border="0" cellpadding="0" cellspacing="5"
style="border-collapse:collapse;">
<tr>
<td>
<div id="loginC">
<table >
<tr>
<td align="center" colspan="2">
<h4>Accede Puerto Rico e</h4></td>
</tr>
<tr>
<td align="right">
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>
</td>
<td>
<asp:TextBox ID="UserName" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server"
ControlToValidate="UserName" ErrorMessage="User Name is required."
ToolTip="User Name is required." ValidationGroup="ctl00$lngMainLogin">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server"
ControlToValidate="Password" ErrorMessage="Password is required."
ToolTip="Password is required." ValidationGroup="ctl00$lngMainLogin">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:CheckBox CssClass="checknoborder" ID="RememberMe" runat="server" Text="Remember me" />
</td>
</tr>
<tr>
<td>
</td>
<td>
<a href="ForgotPass.aspx" title="Olvidaste tu contraseña" >¿Olvidaste tu contraseña?</a> </td>
</tr>
<tr>
<td align="center" colspan="2" style="color:Red;">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr>
<td align="right" colspan="2">
<asp:Button ID="LoginButton" CssClass="button" runat="server" CommandName="Login" Text="Log In"
ValidationGroup="ctl00$lngMainLogin" />
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</asp:Panel>
</LayoutTemplate>
</asp:Login>
<asp:Login ID="lngMainLogin" runat="server" CssClass="alignleft"
DestinationPageUrl="~/AdminTool/BarriosUrb/Default.aspx"
FailureText="No hemos podido validar su información. Verifique su username o su password."
PasswordRecoveryUrl="~/UserHelp/ForgotPass.aspx"
PasswordRequiredErrorMessage="Password es requiredo."
UserNameRequiredErrorMessage="User Name es requiredo."
onloggedin="lngMainLogin_LoggedIn" onloggingin="lngMainLogin_LoggingIn" >
<LayoutTemplate>
<asp:Panel runat="server" ID="pnlLogin" DefaultButton="LoginButton">
<table border="0" cellpadding="0" cellspacing="5"
style="border-collapse:collapse;">
<tr>
<td>
<div id="loginC">
<table >
<tr>
<td align="center" colspan="2">
<h4>Accede Puerto Rico e</h4></td>
</tr>
<tr>
<td align="right">
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>
</td>
<td>
<asp:TextBox ID="UserName" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server"
ControlToValidate="UserName" ErrorMessage="User Name is required."
ToolTip="User Name is required." ValidationGroup="ctl00$lngMainLogin">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server"
ControlToValidate="Password" ErrorMessage="Password is required."
ToolTip="Password is required." ValidationGroup="ctl00$lngMainLogin">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:CheckBox CssClass="checknoborder" ID="RememberMe" runat="server" Text="Remember me" />
</td>
</tr>
<tr>
<td>
</td>
<td>
<a href="ForgotPass.aspx" title="Olvidaste tu contraseña" >¿Olvidaste tu contraseña?</a> </td>
</tr>
<tr>
<td align="center" colspan="2" style="color:Red;">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr>
<td align="right" colspan="2">
<asp:Button ID="LoginButton" CssClass="button" runat="server" CommandName="Login" Text="Log In"
ValidationGroup="ctl00$lngMainLogin" />
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</asp:Panel>
</LayoutTemplate>
</asp:Login>