Various fixes for cleanup, fix a bug where changing a password didn't actually run a successful DB query.