Added null check in UserLifeCycle.logout()