Added a setCredentials method and events for when the setCredentials and setRegion methods are used