Updated to use user credentials