Your application is probably appending the @domain.com to the login name. All you have to do is modify your code so that it doesn't do that.
For example, your connect code probably looks something like this:
this.client.connect($("#username").val() + "@" + $("#domain").val(), $("#password").val(), connectArgs);
Make it look more like this:
this.client.connect($("#username").val(), $("#password").val(), connectArgs);