Added a way to check the creds to see if its is an object or a location and handles it accordingly.