add reg_events to event_handler
define message
make client auto connect localhost to reduce testing input