[NF] Add logout function.