change clear user id(logout) logic.
fixed a bug to parse cookie
tuned the logic of challenge client.