Bugfix Issue #397 UI Broken when cookie is clear

1) Fixed the bug that login page cannot find cookies when "roles" in
the cookie is deleted in browser
2) Have the "eval()" function changed to JSON.parse() which is safer
3) Have the var "_tabMode" changed to "kimchi.tabMode" that better fit
kimchi namespace
4) Changed lifetime of cookie "roles" to session

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