I've tried this (and a few other solutions found on the forums) but nothing seems to work for me. I have a loginview with a login control in the Anonymous Template, and have tried this Panel default button solution but my page's default button remains my search button at the top. My code is identical to yours, except it's wrapped in the template:
<AnonymousTemplate>
<asp:Panel ID="Panel1" runat="server" DefaultButton="Login1$LoginButton">
<asp:Login ID="Login1" runat="server" />
</asp:Panel>
</AnonymousTemplate>
I've also tried the Javascript method you linked to, but it doesn't work for me either.
Does anyone have a good solution to this?