Implemented functionality to switch user (also removed some unused files)