got preferences working. also added 'disconnect' functionality.