Add withCredentials as @jayfresh requested in #2