The bot now knows its name!

Added listener for the connect event to grab the bots registered name since the
name tends to change. Added listener for error events to prevent the process
crashing on error.