Fixing error caused when removing user

- Adding cascade edit and deletes of foreign keys
- Adding warning before removing a user
Merge remote-tracking branch 'patrick/qa' into qa