Add Logout function on client side.

1. Add Logout function on client side.
2. Fix bug when cancel the invoice comment.