Bugfix#420 UI: Pop up errors when log out at "Host" tab

1) This patch fix the error that kimchi cannot log out from "Host" page
and log in again to "Host".
2) Fix the bug that UI popup error when loging out from kimchi.

Signed-off-by: Wen Wang <wenwang@linux.vnet.ibm.com>