refine code when user app connected to server