Login fails with email id as the jid

When I tried to login where my userid is an email address, the login fails giving error as “not-authorized”. But if the user id is anything other than an email id (with out @), it works fine. I tried both digest-md5 and plain. Do I need to pack ‘@’ in a different way.

While creation I had to use ‘\40’ instead of ‘@’ but tried the same with login and did not work.

Thanks,

Sujith