added registration retry
basic daemon stuff