cleanup
Better handling of resource creds