some more cleanup. also switching users feature (not fully tested)