Separate QBDomain from QBApp

Also add automatic reauthentication