I can’'t reproduce such a behavior. “Delay in login” and " SSLXMPPConnection lock " describe something similar.
Are you using a debugger / Eclipse? Maybe you can run your project in Eclipse and press “pause” while you’'re waiting, so you see which method/thread causes these problems.
Also, to add to what it2000 was saying, a runtime analysis application would also help to diagnose the origin of the problem. I have used JRat in the past.
I followed your suggestion and ran the Eclipse debugger, pausing while waiting. I found two points which seem to be hold ups, both in SASLAuthentication.authentication(String,String,String), at lines 149 and 162. When I went to track down where this was in the source code I ran into some problems so I downloaded source and fresh binaries. When I re-ran I found performance way up. Login times down to a few seconds.
The problem that fixed the problem you were having was http://www.jivesoftware.org/issues/browse/SMACK-85. BTW, you may want to use the latest nightly build that includes many important bug fixes and important new features.