Created function to set credentials to class variables.