Close import service when import as.

Key issue found when testing gh-1421.

To test:
 * Login as user-6
 * Import data for another user.
 * Data should be imported and service close.

--no-rebase