I have a very similar problem what is described in this thread:

When I run my app, which tries to connect to a site requiring Basic authentication, Series 60 emulator, real Series 60 phone (tested on 6600) and Nokia 7210 emulator works just as described in Nokia's documentation An_Introduction_to_Secure_MIDlet_Communication_in_MIDP_1_0_en.pdf.

When I try to run the app on 6610 phone (Series 40), the HTTP authentication fails and THE _PHONE_ ASKS FOR NEW USERNAME AND PASSWORD! When asking the username, the textbox is pre-filled with: "Basic 49KJHD8FJKH(9=" indicating that the phone somehow mishandles the header information.

I tried the following on 6610:

To my amazement IT WORKED! I don't have the tools to debug if the username and password are sent Base64 encoded or not. This version of my app doesn't work on any emulators or 6600/7210 phones.

Is there a workaround for this problem? I need my MIDlet to work on full range of phones and I'd prefer having the username/password Base64 encoded.