Updated the connect funtion to accept a credential object instead of strings for user/pass. This matches up with my other functions that are similar in nature.