added message in preregister
cleaning, work on register function on server