Login into virtualenv

This allows to `login` and `logout` from shell invoked by virtualenv instead of patching it with `activate` and `deactivate`. This should partially fix #247.