optimize merge algorithm
optimize merge strategy: merge when login