Add logout function.