Added an error event
Changed to on events incase someone decides to reconnect without re-creating the socket
Merge pull request #4 from rickihastings/master

Added error event