Close import service when import as.

Major problem 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