The middleware API already exists (activedirectory.leave) to leave the domain, we just need the webUI to use it.
Leaving a domain requires elevated privileges.
So I'm thinking the webUI could do something like this.
1. have a button called "leave domain"
---when button is pushed, open another dialog box and prompt for username and password
---have a tool-tip in that dialog box so that it can mention that the user should have privileges to actually leave the domain