Updated mapping.
Fixed potential NPE in logout.