further fix for nil resource on login