Added a command and callback for handling join errors, see mercury-clien...

Added a command and callback for handling join errors, see mercury-client for implementation.