add message system and finish login / register function