There seems to be an EventEmitter leak in the client code. If an error is thrown when logging in for example, things don't get cleaned up correctly.
I could be wrong but I don't see any calls to removeListener that balance the on calls that are made so this is probably the problem.