Prevent NPE when user is authenticated with UserDetailsAdapter.